File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -2046,7 +2046,7 @@ macro_rules! m {
2046
2046
($($x:expr)'a*) => (stringify!($($x)'b*));
2047
2047
}
2048
2048
fn f() {
2049
- let _ = stringify!(0 'b1 'b2 );
2049
+ let _ = stringify!(0 'b 1 'b 2 );
2050
2050
}
2051
2051
"# ] ] ,
2052
2052
) ;
Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ macro_rules! delegate_impl {
784
784
}
785
785
}
786
786
}
787
- impl <> Data for &'amut G where G: Data {}
787
+ impl <> Data for &'a mut G where G: Data {}
788
788
"# ] ] ,
789
789
) ;
790
790
}
Original file line number Diff line number Diff line change @@ -308,8 +308,16 @@ fn pretty_print_macro_expansion(
308
308
{
309
309
" "
310
310
}
311
- ( IDENT , _) if curr_kind. is_keyword ( Edition :: CURRENT ) => " " ,
312
- ( _, IDENT ) if prev_kind. is_keyword ( Edition :: CURRENT ) => " " ,
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 ( ) =>
318
+ {
319
+ " "
320
+ }
313
321
( T ! [ >] , IDENT ) => " " ,
314
322
( T ! [ >] , _) if curr_kind. is_keyword ( Edition :: CURRENT ) => " " ,
315
323
( T ! [ ->] , _) | ( _, T ! [ ->] ) => " " ,
You can’t perform that action at this time.
0 commit comments