Skip to content

Commit 8c6769d

Browse files
fix: indentation issue on generic bounds
1 parent 9f7d1f2 commit 8c6769d

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

Diff for: src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ fn join_bounds_inner(
931931
_ => false,
932932
};
933933

934-
let shape = if i > 0 && need_indent && force_newline {
934+
let shape = if need_indent && force_newline {
935935
shape
936936
.block_indent(context.config.tab_spaces())
937937
.with_max_width(context.config)

Diff for: 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+
}

Diff for: 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)