From dfcbe75900f2cb813754ef104526ebce568fd75b Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 11 Aug 2019 01:08:30 +0300 Subject: syntax_pos: Introduce a helper for checking whether a span comes from expansion --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2286e74e633..3b0af88f651 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1101,7 +1101,7 @@ impl<'a> Parser<'a> { crate fn process_potential_macro_variable(&mut self) { self.token = match self.token.kind { - token::Dollar if self.token.span.ctxt() != SyntaxContext::empty() && + token::Dollar if self.token.span.from_expansion() && self.look_ahead(1, |t| t.is_ident()) => { self.bump(); let name = match self.token.kind { -- cgit 1.4.1-3-g733a5