diff options
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
| -rw-r--r-- | compiler/rustc_session/src/utils.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs index 6a8775bd10b..9a286d94ab8 100644 --- a/compiler/rustc_session/src/utils.rs +++ b/compiler/rustc_session/src/utils.rs @@ -132,6 +132,9 @@ impl<'a> FlattenNonterminals<'a> { pub fn process_token(&mut self, token: Token) -> TokenStream { match token.kind { + token::Interpolated(nt) if let token::NtIdent(ident, is_raw) = *nt => { + TokenTree::Token(Token::new(token::Ident(ident.name, is_raw), ident.span)).into() + } token::Interpolated(nt) => { let tts = (self.nt_to_tokenstream)(&nt, self.parse_sess, self.synthesize_tokens); TokenTree::Delimited( |
