about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/types.rs2
-rw-r--r--tests/source/issue_4636.rs13
-rw-r--r--tests/target/issue_4636.rs13
3 files changed, 27 insertions, 1 deletions
diff --git a/src/types.rs b/src/types.rs
index bedc29fbc1a..7ef0c39d578 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -936,7 +936,7 @@ fn join_bounds_inner(
                 _ => false,
             };
 
-            let shape = if i > 0 && need_indent && force_newline {
+            let shape = if need_indent && force_newline {
                 shape
                     .block_indent(context.config.tab_spaces())
                     .with_max_width(context.config)
diff --git a/tests/source/issue_4636.rs b/tests/source/issue_4636.rs
new file mode 100644
index 00000000000..ea7079f6c73
--- /dev/null
+++ b/tests/source/issue_4636.rs
@@ -0,0 +1,13 @@
+pub trait PrettyPrinter<'tcx>:
+    Printer<
+        'tcx,
+        Error = fmt::Error,
+        Path = Self,
+        Region = Self,
+        Type = Self,
+        DynExistential = Self,
+        Const = Self,
+    > + fmt::Write
+    {
+         //
+    }
\ No newline at end of file
diff --git a/tests/target/issue_4636.rs b/tests/target/issue_4636.rs
new file mode 100644
index 00000000000..a6465e29a02
--- /dev/null
+++ b/tests/target/issue_4636.rs
@@ -0,0 +1,13 @@
+pub trait PrettyPrinter<'tcx>:
+    Printer<
+        'tcx,
+        Error = fmt::Error,
+        Path = Self,
+        Region = Self,
+        Type = Self,
+        DynExistential = Self,
+        Const = Self,
+    > + fmt::Write
+{
+    //
+}