Migrate some rustc_builtin_macros to SessionDiagnostic
This commit is contained in:
parent
ed1ce580ec
commit
8af8a95a64
11 changed files with 134 additions and 32 deletions
|
@ -87,6 +87,83 @@ pub(crate) struct ConcatBytestr {
|
|||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_concat_c_str_lit)]
|
||||
pub(crate) struct ConcatCStrLit {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_export_macro_rules)]
|
||||
pub(crate) struct ExportMacroRules {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_proc_macro)]
|
||||
pub(crate) struct ProcMacro {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_invalid_crate_attribute)]
|
||||
pub(crate) struct InvalidCrateAttr {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_non_abi)]
|
||||
pub(crate) struct NonABI {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_trace_macros)]
|
||||
pub(crate) struct TraceMacros {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_bench_sig)]
|
||||
pub(crate) struct BenchSig {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_test_arg_non_lifetime)]
|
||||
pub(crate) struct TestArgNonLifetime {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_should_panic)]
|
||||
pub(crate) struct ShouldPanic {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_test_args)]
|
||||
pub(crate) struct TestArgs {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_alloc_must_statics)]
|
||||
pub(crate) struct AllocMustStatics {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_concat_bytes_invalid)]
|
||||
pub(crate) struct ConcatBytesInvalid {
|
||||
|
@ -201,6 +278,10 @@ pub(crate) struct BadDeriveTarget {
|
|||
pub(crate) item: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_tests_not_support)]
|
||||
pub(crate) struct TestsNotSupport {}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_unexpected_lit, code = "E0777")]
|
||||
pub(crate) struct BadDeriveLit {
|
||||
|
@ -732,3 +813,10 @@ pub(crate) struct TestRunnerNargs {
|
|||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_expected_register_class_or_explict_register)]
|
||||
pub(crate) struct ExpectedRegisterClassOrExplictRegister {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue