Avoid too many expected symbols and reduce Nones

This commit is contained in:
r0cky
2023-08-03 08:56:31 +00:00
parent 41e85c3d23
commit 8c8af6cf99
12 changed files with 58 additions and 64 deletions

View File

@@ -168,7 +168,7 @@ impl<'a> Parser<'a> {
}.into_diagnostic(&self.sess.span_diagnostic));
}
NonterminalKind::Path => token::NtPath(
P(self.collect_tokens_no_attrs(|this| this.parse_path(PathStyle::Type, None))?),
P(self.collect_tokens_no_attrs(|this| this.parse_path(PathStyle::Type))?),
),
NonterminalKind::Meta => token::NtMeta(P(self.parse_attr_item(true)?)),
NonterminalKind::Vis => token::NtVis(