1
Fork 0

Rollup merge of #124391 - nnethercote:builtin_macros-cleanups, r=fee1-dead

`rustc_builtin_macros` cleanups

Some improvements I found while looking over this code.

r? ``@fee1-dead``
This commit is contained in:
Jacob Pratt 2024-04-26 19:25:55 -04:00 committed by GitHub
commit 608f71ec66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 352 additions and 341 deletions

View file

@ -579,7 +579,7 @@ pub(crate) struct FormatUnknownTrait<'a> {
style = "tool-only",
applicability = "maybe-incorrect"
)]
pub struct FormatUnknownTraitSugg {
pub(crate) struct FormatUnknownTraitSugg {
#[primary_span]
pub span: Span,
pub fmt: &'static str,
@ -842,3 +842,26 @@ pub(crate) struct ExpectedRegisterClassOrExplicitRegister {
#[primary_span]
pub(crate) span: Span,
}
#[derive(Diagnostic)]
#[diag(builtin_macros_expected_comma_in_list)]
pub(crate) struct ExpectedCommaInList {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(builtin_macros_only_one_argument)]
pub(crate) struct OnlyOneArgument<'a> {
#[primary_span]
pub span: Span,
pub name: &'a str,
}
#[derive(Diagnostic)]
#[diag(builtin_macros_takes_no_arguments)]
pub(crate) struct TakesNoArguments<'a> {
#[primary_span]
pub span: Span,
pub name: &'a str,
}