Replace #[lint/warning/error] with #[diag]

This commit is contained in:
Xiretza 2022-08-19 15:40:48 +02:00
parent bd0d3f745d
commit 7f3a6fd7f6
16 changed files with 446 additions and 390 deletions

View file

@ -244,7 +244,7 @@ impl MultiSugg {
}
#[derive(SessionDiagnostic)]
#[error(parser::maybe_report_ambiguous_plus)]
#[diag(parser::maybe_report_ambiguous_plus)]
struct AmbiguousPlus {
pub sum_ty: String,
#[primary_span]
@ -253,7 +253,7 @@ struct AmbiguousPlus {
}
#[derive(SessionDiagnostic)]
#[error(parser::maybe_recover_from_bad_type_plus, code = "E0178")]
#[diag(parser::maybe_recover_from_bad_type_plus, code = "E0178")]
struct BadTypePlus {
pub ty: String,
#[primary_span]
@ -287,7 +287,7 @@ pub enum BadTypePlusSub {
}
#[derive(SessionDiagnostic)]
#[error(parser::maybe_recover_from_bad_qpath_stage_2)]
#[diag(parser::maybe_recover_from_bad_qpath_stage_2)]
struct BadQPathStage2 {
#[primary_span]
#[suggestion(applicability = "maybe-incorrect")]
@ -296,7 +296,7 @@ struct BadQPathStage2 {
}
#[derive(SessionDiagnostic)]
#[error(parser::incorrect_semicolon)]
#[diag(parser::incorrect_semicolon)]
struct IncorrectSemicolon<'a> {
#[primary_span]
#[suggestion_short(applicability = "machine-applicable")]
@ -307,7 +307,7 @@ struct IncorrectSemicolon<'a> {
}
#[derive(SessionDiagnostic)]
#[error(parser::incorrect_use_of_await)]
#[diag(parser::incorrect_use_of_await)]
struct IncorrectUseOfAwait {
#[primary_span]
#[suggestion(parser::parentheses_suggestion, applicability = "machine-applicable")]
@ -315,7 +315,7 @@ struct IncorrectUseOfAwait {
}
#[derive(SessionDiagnostic)]
#[error(parser::incorrect_use_of_await)]
#[diag(parser::incorrect_use_of_await)]
struct IncorrectAwait {
#[primary_span]
span: Span,
@ -326,7 +326,7 @@ struct IncorrectAwait {
}
#[derive(SessionDiagnostic)]
#[error(parser::in_in_typo)]
#[diag(parser::in_in_typo)]
struct InInTypo {
#[primary_span]
span: Span,
@ -335,7 +335,7 @@ struct InInTypo {
}
#[derive(SessionDiagnostic)]
#[error(parser::invalid_variable_declaration)]
#[diag(parser::invalid_variable_declaration)]
pub struct InvalidVariableDeclaration {
#[primary_span]
pub span: Span,