From 9be233cbfe134f032ed2d50f7cc66e901bbe3f6f Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 7 Mar 2020 15:58:27 +0300 Subject: Use `Token::uninterpolate` in couple more places matching on `(Nt)Ident` --- src/librustc_parse/parser/expr.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/librustc_parse/parser/expr.rs') diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index f7cfb028a7a..d28b9cd9682 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -50,7 +50,6 @@ macro_rules! maybe_whole_expr { AttrVec::new(), )); } - // N.B., `NtIdent(ident)` is normalized to `Ident` in `fn bump`. _ => {} }; } @@ -482,7 +481,7 @@ impl<'a> Parser<'a> { } fn is_mistaken_not_ident_negation(&self) -> bool { - let token_cannot_continue_expr = |t: &Token| match t.kind { + let token_cannot_continue_expr = |t: &Token| match t.uninterpolate().kind { // These tokens can start an expression after `!`, but // can't continue an expression after an ident token::Ident(name, is_raw) => token::ident_can_begin_expr(name, t.span, is_raw), -- cgit 1.4.1-3-g733a5