File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -302,19 +302,12 @@ fn pretty_print_macro_expansion(
302302 ( _, T ! [ '{' ] ) => " " ,
303303 ( T ! [ ; ] | T ! [ '{' ] | T ! [ '}' ] , _) => "\n " ,
304304 ( _, T ! [ '}' ] ) => "\n " ,
305- ( IDENT | LIFETIME_IDENT , IDENT | LIFETIME_IDENT ) => " " ,
306- _ if prev_kind. is_keyword ( Edition :: CURRENT )
307- && curr_kind. is_keyword ( Edition :: CURRENT ) =>
308- {
309- " "
310- }
311- ( IDENT | LIFETIME_IDENT , _)
312- if curr_kind. is_keyword ( Edition :: CURRENT ) || curr_kind. is_literal ( ) =>
313- {
314- " "
315- }
316- ( _, IDENT | LIFETIME_IDENT )
317- if prev_kind. is_keyword ( Edition :: CURRENT ) || prev_kind. is_literal ( ) =>
305+ _ if ( prev_kind. is_any_identifier ( )
306+ || prev_kind == LIFETIME_IDENT
307+ || prev_kind. is_literal ( ) )
308+ && ( curr_kind. is_any_identifier ( )
309+ || curr_kind == LIFETIME_IDENT
310+ || curr_kind. is_literal ( ) ) =>
318311 {
319312 " "
320313 }
You can’t perform that action at this time.
0 commit comments