File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -2218,10 +2218,16 @@ fn rewrite_fn_base(
2218
2218
. map_or ( false , |last_line| last_line. contains ( "//" ) ) ;
2219
2219
2220
2220
if context. config . version ( ) == Version :: Two {
2221
- result . push ( ')' ) ;
2222
- if closing_paren_overflow_max_width || params_last_line_contains_comment {
2221
+ if closing_paren_overflow_max_width {
2222
+ result . push ( ')' ) ;
2223
2223
result. push_str ( & indent. to_string_with_newline ( context. config ) ) ;
2224
2224
no_params_and_over_max_width = true ;
2225
+ } else if params_last_line_contains_comment {
2226
+ result. push_str ( & indent. to_string_with_newline ( context. config ) ) ;
2227
+ result. push ( ')' ) ;
2228
+ no_params_and_over_max_width = true ;
2229
+ } else {
2230
+ result. push ( ')' ) ;
2225
2231
}
2226
2232
} else {
2227
2233
if closing_paren_overflow_max_width || params_last_line_contains_comment {
Original file line number Diff line number Diff line change
1
+ // rustfmt-version: Two
2
+ fn bar ( _t : T , // bar
3
+ ) {
4
+ }
You can’t perform that action at this time.
0 commit comments