refactor: refactor identifier parsing somewhat
This commit is contained in:
parent
85123d2504
commit
c9ddb73184
5 changed files with 31 additions and 23 deletions
|
@ -1744,7 +1744,7 @@ impl<'a> Parser<'a> {
|
|||
/// Parses a field identifier. Specialized version of `parse_ident_common`
|
||||
/// for better diagnostics and suggestions.
|
||||
fn parse_field_ident(&mut self, adt_ty: &str, lo: Span) -> PResult<'a, Ident> {
|
||||
let (ident, is_raw) = self.ident_or_err()?;
|
||||
let (ident, is_raw) = self.ident_or_err(true)?;
|
||||
if !is_raw && ident.is_reserved() {
|
||||
let snapshot = self.create_snapshot_for_diagnostic();
|
||||
let err = if self.check_fn_front_matter(false, Case::Sensitive) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue