File tree 3 files changed +24
-2
lines changed
3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -2110,7 +2110,7 @@ fn choose_rhs<R: Rewrite>(
2110
2110
expr : & R ,
2111
2111
shape : Shape ,
2112
2112
orig_rhs : Option < String > ,
2113
- _rhs_kind : & RhsAssignKind < ' _ > ,
2113
+ rhs_kind : & RhsAssignKind < ' _ > ,
2114
2114
rhs_tactics : RhsTactics ,
2115
2115
has_rhs_comment : bool ,
2116
2116
) -> Option < String > {
@@ -2141,7 +2141,11 @@ fn choose_rhs<R: Rewrite>(
2141
2141
( Some ( ref orig_rhs) , Some ( ref new_rhs) )
2142
2142
if prefer_next_line ( orig_rhs, new_rhs, rhs_tactics) =>
2143
2143
{
2144
- Some ( format ! ( "{new_indent_str}{new_rhs}" ) )
2144
+ if let RhsAssignKind :: Bounds = rhs_kind {
2145
+ Some ( new_rhs. lines ( ) . map ( |l| format ! ( "{new_indent_str}{l}" ) ) . join ( "" ) )
2146
+ } else {
2147
+ Some ( format ! ( "{new_indent_str}{new_rhs}" ) )
2148
+ }
2145
2149
}
2146
2150
( None , Some ( ref new_rhs) ) => Some ( format ! ( "{new_indent_str}{new_rhs}" ) ) ,
2147
2151
( None , None ) if rhs_tactics == RhsTactics :: AllowOverflow => {
Original file line number Diff line number Diff line change
1
+ trait Foo :
2
+ Fn (
3
+ ReallyLongTypeName ,
4
+ ReallyLongTypeName ,
5
+ ReallyLongTypeName ,
6
+ ReallyLongTypeName ,
7
+ ) -> ReallyLongTypeName
8
+ {
9
+ }
Original file line number Diff line number Diff line change
1
+ trait Foo :
2
+ Fn (
3
+ ReallyLongTypeName ,
4
+ ReallyLongTypeName ,
5
+ ReallyLongTypeName ,
6
+ ReallyLongTypeName ,
7
+ ) -> ReallyLongTypeName
8
+ {
9
+ }
You can’t perform that action at this time.
0 commit comments