diff options
| author | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-18 11:45:41 -0400 |
|---|---|---|
| committer | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-21 11:39:52 -0400 |
| commit | 19b348fed44342d8addbbb5e8f67cda5dc8d9b95 (patch) | |
| tree | 08bc0d9e7f50ba3a3eb8f227ce9f1e82904a6cb5 /compiler/rustc_lint/src/errors.rs | |
| parent | 5b8152807cae152d5c7cfb40615e5a817a6cf750 (diff) | |
| download | rust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.tar.gz rust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.zip | |
UPDATE - rename DiagnosticHandler trait to IntoDiagnostic
Diffstat (limited to 'compiler/rustc_lint/src/errors.rs')
| -rw-r--r-- | compiler/rustc_lint/src/errors.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs index ac98948189b..261570acb7b 100644 --- a/compiler/rustc_lint/src/errors.rs +++ b/compiler/rustc_lint/src/errors.rs @@ -1,9 +1,9 @@ -use rustc_errors::{fluent, AddSubdiagnostic, ErrorGuaranteed, Handler, SessionDiagnostic}; -use rustc_macros::{SessionDiagnostic, SessionSubdiagnostic}; +use rustc_errors::{fluent, AddSubdiagnostic, IntoDiagnostic, ErrorGuaranteed, Handler}; +use rustc_macros::{DiagnosticHandler, SessionSubdiagnostic}; use rustc_session::lint::Level; use rustc_span::{Span, Symbol}; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::overruled_attribute, code = "E0453")] pub struct OverruledAttribute { #[primary_span] @@ -42,7 +42,7 @@ impl AddSubdiagnostic for OverruledAttributeSub { } } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::malformed_attribute, code = "E0452")] pub struct MalformedAttribute { #[primary_span] @@ -61,7 +61,7 @@ pub enum MalformedAttributeSub { ReasonMustComeLast(#[primary_span] Span), } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::unknown_tool_in_scoped_lint, code = "E0710")] pub struct UnknownToolInScopedLint { #[primary_span] @@ -72,7 +72,7 @@ pub struct UnknownToolInScopedLint { pub is_nightly_build: Option<()>, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::builtin_ellipsis_inclusive_range_patterns, code = "E0783")] pub struct BuiltinEllpisisInclusiveRangePatterns { #[primary_span] @@ -107,7 +107,7 @@ impl AddSubdiagnostic for RequestedLevel { } } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::unsupported_group, code = "E0602")] pub struct UnsupportedGroup { pub lint_group: String, @@ -119,7 +119,7 @@ pub struct CheckNameUnknown { pub sub: RequestedLevel, } -impl SessionDiagnostic<'_> for CheckNameUnknown { +impl IntoDiagnostic<'_> for CheckNameUnknown { fn into_diagnostic( self, handler: &Handler, @@ -136,7 +136,7 @@ impl SessionDiagnostic<'_> for CheckNameUnknown { } } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::check_name_unknown_tool, code = "E0602")] pub struct CheckNameUnknownTool { pub tool_name: Symbol, @@ -144,7 +144,7 @@ pub struct CheckNameUnknownTool { pub sub: RequestedLevel, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::check_name_warning)] pub struct CheckNameWarning { pub msg: String, @@ -152,7 +152,7 @@ pub struct CheckNameWarning { pub sub: RequestedLevel, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(lint::check_name_deprecated)] pub struct CheckNameDeprecated { pub lint_name: String, |
