try gating early, add non-ascii test

This commit is contained in:
Deadbeef 2023-03-07 05:09:19 +00:00
parent 78e3455d37
commit bf3ca5979e
3 changed files with 11 additions and 1 deletions

View file

@ -1,4 +1,3 @@
use ast::token;
use rustc_ast as ast;
use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
use rustc_ast::{attr, AssocConstraint, AssocConstraintKind, NodeId};

View file

@ -1922,6 +1922,7 @@ impl<'a> Parser<'a> {
let recovered = self.recover_after_dot();
let token = recovered.as_ref().unwrap_or(&self.token);
let span = token.span;
token::Lit::from_token(token).map(|token_lit| {
self.bump();
(token_lit, span)