Skip to content

Commit d545261

Browse files
fix: indentation issue on generic bounds
1 parent e1ab878 commit d545261

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

src/formatting/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ fn join_bounds_inner(
933933
_ => false,
934934
};
935935

936-
let shape = if i > 0 && need_indent && force_newline {
936+
let shape = if need_indent && force_newline {
937937
shape
938938
.block_indent(context.config.tab_spaces())
939939
.with_max_width(context.config)

tests/source/issue_4636.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pub trait PrettyPrinter<'tcx>:
2+
Printer<
3+
'tcx,
4+
Error = fmt::Error,
5+
Path = Self,
6+
Region = Self,
7+
Type = Self,
8+
DynExistential = Self,
9+
Const = Self,
10+
> + fmt::Write
11+
{
12+
//
13+
}

tests/target/issue_4636.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pub trait PrettyPrinter<'tcx>:
2+
Printer<
3+
'tcx,
4+
Error = fmt::Error,
5+
Path = Self,
6+
Region = Self,
7+
Type = Self,
8+
DynExistential = Self,
9+
Const = Self,
10+
> + fmt::Write
11+
{
12+
//
13+
}

0 commit comments

Comments
 (0)