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 {
20462046 ($($x:expr)'a*) => (stringify!($($x)'b*));
20472047}
20482048fn f() {
2049- let _ = stringify!(0 'b1 'b2 );
2049+ let _ = stringify!(0 'b 1 'b 2 );
20502050}
20512051 "# ] ] ,
20522052 ) ;
Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ macro_rules! delegate_impl {
784784 }
785785 }
786786}
787- impl <> Data for &'amut G where G: Data {}
787+ impl <> Data for &'a mut G where G: Data {}
788788"# ] ] ,
789789 ) ;
790790}
Original file line number Diff line number Diff line change @@ -308,8 +308,16 @@ fn pretty_print_macro_expansion(
308308 {
309309 " "
310310 }
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+ }
313321 ( T ! [ >] , IDENT ) => " " ,
314322 ( T ! [ >] , _) if curr_kind. is_keyword ( Edition :: CURRENT ) => " " ,
315323 ( T ! [ ->] , _) | ( _, T ! [ ->] ) => " " ,
You can’t perform that action at this time.
0 commit comments