Migrate some rustc_builtin_macros to SessionDiagnostic
Signed-off-by: he1pa <18012015693@163.com>
This commit is contained in:
parent
3d5d7a24f7
commit
a82f70eeee
5 changed files with 76 additions and 23 deletions
|
@ -728,6 +728,14 @@ pub(crate) struct AsmExpectedComma {
|
|||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_asm_expected_string_literal)]
|
||||
pub(crate) struct AsmExpectedStringLiteral {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_asm_underscore_input)]
|
||||
pub(crate) struct AsmUnderscoreInput {
|
||||
|
@ -781,6 +789,14 @@ pub(crate) struct AsmNoReturn {
|
|||
pub(crate) outputs_sp: Vec<Span>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_asm_no_matched_argument_name)]
|
||||
pub(crate) struct AsmNoMatchedArgumentName {
|
||||
pub(crate) name: String,
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_asm_mayunwind)]
|
||||
pub(crate) struct AsmMayUnwind {
|
||||
|
@ -872,3 +888,27 @@ pub(crate) struct TakesNoArguments<'a> {
|
|||
pub span: Span,
|
||||
pub name: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_proc_macro_attribute_only_be_used_on_bare_functions)]
|
||||
pub(crate) struct AttributeOnlyBeUsedOnBareFunctions<'a> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub path: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_proc_macro_attribute_only_usable_with_crate_type)]
|
||||
pub(crate) struct AttributeOnlyUsableWithCrateType<'a> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub path: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(builtin_macros_source_uitls_expected_item)]
|
||||
pub(crate) struct ExpectedItem<'a> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub token: &'a str,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue