Skip to content

Commit 17d21ed

Browse files
calebcartwrightdavidBar-On
authored andcommitted
fix: indentation issue on generic bounds
1 parent 50d36bb commit 17d21ed

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

src/formatting/types.rs

+1-1
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

+13
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

+13
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)