File tree 5 files changed +38
-1
lines changed
5 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -2996,10 +2996,12 @@ fn rewrite_bounds_on_where_clause(
2996
2996
DefinitiveListTactic :: Vertical
2997
2997
} ;
2998
2998
2999
+ let preserve_newline = context. config . version ( ) == Version :: One ;
3000
+
2999
3001
let fmt = ListFormatting :: new ( shape, context. config )
3000
3002
. tactic ( shape_tactic)
3001
3003
. trailing_separator ( comma_tactic)
3002
- . preserve_newline ( true ) ;
3004
+ . preserve_newline ( preserve_newline ) ;
3003
3005
write_list ( & items. collect :: < Vec < _ > > ( ) , & fmt)
3004
3006
}
3005
3007
Original file line number Diff line number Diff line change
1
+ // rustfmt-version: One
2
+
3
+ fn foo < T > ( _: T )
4
+ where
5
+ T : std:: fmt:: Debug ,
6
+
7
+ T : std:: fmt:: Display ,
8
+ {
9
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-version: Two
2
+
3
+ fn foo < T > ( _: T )
4
+ where
5
+ T : std:: fmt:: Debug ,
6
+
7
+ T : std:: fmt:: Display ,
8
+ {
9
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-version: One
2
+
3
+ fn foo < T > ( _: T )
4
+ where
5
+ T : std:: fmt:: Debug ,
6
+
7
+ T : std:: fmt:: Display ,
8
+ {
9
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-version: Two
2
+
3
+ fn foo < T > ( _: T )
4
+ where
5
+ T : std:: fmt:: Debug ,
6
+ T : std:: fmt:: Display ,
7
+ {
8
+ }
You can’t perform that action at this time.
0 commit comments