This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-18
lines changed
compiler/rustc_session/src Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 11#![ feature( crate_visibility_modifier) ]
22#![ feature( derive_default_enum) ]
3+ #![ feature( if_let_guard) ]
34#![ feature( let_chains) ]
45#![ feature( let_else) ]
56#![ feature( min_specialization) ]
Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ impl<'a> FlattenNonterminals<'a> {
132132
133133 pub fn process_token ( & mut self , token : Token ) -> TokenStream {
134134 match token. kind {
135+ token:: Interpolated ( nt) if let token:: NtIdent ( ident, is_raw) = * nt => {
136+ TokenTree :: Token ( Token :: new ( token:: Ident ( ident. name , is_raw) , ident. span ) ) . into ( )
137+ }
135138 token:: Interpolated ( nt) => {
136139 let tts = ( self . nt_to_tokenstream ) ( & nt, self . parse_sess , self . synthesize_tokens ) ;
137140 TokenTree :: Delimited (
Original file line number Diff line number Diff line change 11PRINT-BANG INPUT (DISPLAY): FirstStruct
22PRINT-BANG INPUT (DEBUG): TokenStream [
3- Group {
4- delimiter: None,
5- stream: TokenStream [
6- Ident {
7- ident: "FirstStruct",
8- span: $DIR/auxiliary/nested-macro-rules.rs:16:14: 16:25 (#7),
9- },
10- ],
11- span: $DIR/auxiliary/nested-macro-rules.rs:9:30: 9:35 (#6),
3+ Ident {
4+ ident: "FirstStruct",
5+ span: $DIR/auxiliary/nested-macro-rules.rs:16:14: 16:25 (#7),
126 },
137]
148PRINT-ATTR INPUT (DISPLAY): struct FirstAttrStruct {}
@@ -17,15 +11,9 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
1711 ident: "struct",
1812 span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#6),
1913 },
20- Group {
21- delimiter: None,
22- stream: TokenStream [
23- Ident {
24- ident: "FirstAttrStruct",
25- span: $DIR/auxiliary/nested-macro-rules.rs:16:27: 16:42 (#7),
26- },
27- ],
28- span: $DIR/auxiliary/nested-macro-rules.rs:10:39: 10:56 (#6),
14+ Ident {
15+ ident: "FirstAttrStruct",
16+ span: $DIR/auxiliary/nested-macro-rules.rs:16:27: 16:42 (#7),
2917 },
3018 Group {
3119 delimiter: Brace,
You can’t perform that action at this time.
0 commit comments