Use identifiers in diagnostics more often

This commit is contained in:
Michael Goulet 2025-01-27 01:16:12 +00:00
parent f85c6de552
commit ac1c6c50f4
21 changed files with 83 additions and 72 deletions

View file

@ -3233,7 +3233,7 @@ pub(crate) struct MalformedCfgAttr {
pub(crate) struct UnknownBuiltinConstruct {
#[primary_span]
pub span: Span,
pub name: Symbol,
pub name: Ident,
}
#[derive(Diagnostic)]

View file

@ -1958,7 +1958,7 @@ impl<'a> Parser<'a> {
} else {
let err = self.dcx().create_err(errors::UnknownBuiltinConstruct {
span: lo.to(ident.span),
name: ident.name,
name: ident,
});
return Err(err);
};