File tree 3 files changed +10
-18
lines changed
compiler/rustc_session/src
3 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 1
1
#![ feature( crate_visibility_modifier) ]
2
2
#![ feature( derive_default_enum) ]
3
+ #![ feature( if_let_guard) ]
3
4
#![ feature( let_chains) ]
4
5
#![ feature( let_else) ]
5
6
#![ feature( min_specialization) ]
Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ impl<'a> FlattenNonterminals<'a> {
132
132
133
133
pub fn process_token ( & mut self , token : Token ) -> TokenStream {
134
134
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
+ }
135
138
token:: Interpolated ( nt) => {
136
139
let tts = ( self . nt_to_tokenstream ) ( & nt, self . parse_sess , self . synthesize_tokens ) ;
137
140
TokenTree :: Delimited (
Original file line number Diff line number Diff line change 1
1
PRINT-BANG INPUT (DISPLAY): FirstStruct
2
2
PRINT-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),
12
6
},
13
7
]
14
8
PRINT-ATTR INPUT (DISPLAY): struct FirstAttrStruct {}
@@ -17,15 +11,9 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
17
11
ident: "struct",
18
12
span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#6),
19
13
},
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),
29
17
},
30
18
Group {
31
19
delimiter: Brace,
You can’t perform that action at this time.
0 commit comments