File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2586,13 +2586,13 @@ fn rewrite_fn_base(
25862586 . map_or ( false , |last_line| last_line. contains ( "//" ) ) ;
25872587
25882588 if context. config . style_edition ( ) >= StyleEdition :: Edition2024 {
2589- if closing_paren_overflow_max_width {
2590- result. push ( ')' ) ;
2589+ if params_last_line_contains_comment {
25912590 result. push_str ( & indent. to_string_with_newline ( context. config ) ) ;
2591+ result. push ( ')' ) ;
25922592 no_params_and_over_max_width = true ;
2593- } else if params_last_line_contains_comment {
2594- result. push_str ( & indent. to_string_with_newline ( context. config ) ) ;
2593+ } else if closing_paren_overflow_max_width {
25952594 result. push ( ')' ) ;
2595+ result. push_str ( & indent. to_string_with_newline ( context. config ) ) ;
25962596 no_params_and_over_max_width = true ;
25972597 } else {
25982598 result. push ( ')' ) ;
Original file line number Diff line number Diff line change 1+ // rustfmt-edition: 2024
2+ // rustfmt-style_edition: 2024
3+ pub async fn foo (
4+ // OriginalUri(original_uri): OriginalUri,
5+ ) -> Option < Option < Option < Option < String > > > > {
6+ None
7+ }
Original file line number Diff line number Diff line change 1+ // rustfmt-edition: 2024
2+ // rustfmt-style_edition: 2024
3+ pub async fn foo ( // OriginalUri(original_uri): OriginalUri,
4+ ) -> Option < Option < Option < Option < String > > > > {
5+ None
6+ }
You can’t perform that action at this time.
0 commit comments