diff options
| author | Rejyr <jerrylwang123@gmail.com> | 2022-08-22 08:33:47 -0400 | 
|---|---|---|
| committer | Rejyr <jerrylwang123@gmail.com> | 2022-08-22 08:33:47 -0400 | 
| commit | 257cf03e2caa673ca1248727c09b4a08d093d706 (patch) | |
| tree | 50df2f3a257c01542f5f75567c7f65792fb58f91 /compiler/rustc_lint/src/errors.rs | |
| parent | 1974186d3285d5ed21e7c9427a1c5e7a93d99596 (diff) | |
| download | rust-257cf03e2caa673ca1248727c09b4a08d093d706.tar.gz rust-257cf03e2caa673ca1248727c09b4a08d093d706.zip | |
refactor: migrate to kind-less `SessionDiagnostic` derives
Diffstat (limited to 'compiler/rustc_lint/src/errors.rs')
| -rw-r--r-- | compiler/rustc_lint/src/errors.rs | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs index a6859311cfd..606d8bda8aa 100644 --- a/compiler/rustc_lint/src/errors.rs +++ b/compiler/rustc_lint/src/errors.rs @@ -4,7 +4,7 @@ use rustc_session::{lint::Level, parse::ParseSess, SessionDiagnostic}; use rustc_span::{Span, Symbol}; #[derive(SessionDiagnostic)] -#[error(lint::overruled_attribute, code = "E0453")] +#[diag(lint::overruled_attribute, code = "E0453")] pub struct OverruledAttribute { #[primary_span] pub span: Span, @@ -43,7 +43,7 @@ impl AddSubdiagnostic for OverruledAttributeSub { } #[derive(SessionDiagnostic)] -#[error(lint::malformed_attribute, code = "E0452")] +#[diag(lint::malformed_attribute, code = "E0452")] pub struct MalformedAttribute { #[primary_span] pub span: Span, @@ -62,7 +62,7 @@ pub enum MalformedAttributeSub { } #[derive(SessionDiagnostic)] -#[error(lint::unknown_tool_in_scoped_lint, code = "E0710")] +#[diag(lint::unknown_tool_in_scoped_lint, code = "E0710")] pub struct UnknownToolInScopedLint { #[primary_span] pub span: Option<Span>, @@ -73,7 +73,7 @@ pub struct UnknownToolInScopedLint { } #[derive(SessionDiagnostic)] -#[error(lint::builtin_ellipsis_inclusive_range_patterns, code = "E0783")] +#[diag(lint::builtin_ellipsis_inclusive_range_patterns, code = "E0783")] pub struct BuiltinEllpisisInclusiveRangePatterns { #[primary_span] pub span: Span, @@ -108,7 +108,7 @@ impl AddSubdiagnostic for RequestedLevel { } #[derive(SessionDiagnostic)] -#[error(lint::unsupported_group, code = "E0602")] +#[diag(lint::unsupported_group, code = "E0602")] pub struct UnsupportedGroup { pub lint_group: String, } @@ -137,7 +137,7 @@ impl SessionDiagnostic<'_> for CheckNameUnknown { } #[derive(SessionDiagnostic)] -#[error(lint::check_name_unknown_tool, code = "E0602")] +#[diag(lint::check_name_unknown_tool, code = "E0602")] pub struct CheckNameUnknownTool { pub tool_name: Symbol, #[subdiagnostic] @@ -145,7 +145,7 @@ pub struct CheckNameUnknownTool { } #[derive(SessionDiagnostic)] -#[warning(lint::check_name_warning)] +#[diag(lint::check_name_warning)] pub struct CheckNameWarning { pub msg: String, #[subdiagnostic] @@ -153,7 +153,7 @@ pub struct CheckNameWarning { } #[derive(SessionDiagnostic)] -#[warning(lint::check_name_deprecated)] +#[diag(lint::check_name_deprecated)] pub struct CheckNameDeprecated { pub lint_name: String, pub new_name: String, | 
