diff options
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/errors.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/internal.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs index 261570acb7b..e5670833898 100644 --- a/compiler/rustc_lint/src/errors.rs +++ b/compiler/rustc_lint/src/errors.rs @@ -1,4 +1,4 @@ -use rustc_errors::{fluent, AddSubdiagnostic, IntoDiagnostic, ErrorGuaranteed, Handler}; +use rustc_errors::{fluent, AddToDiagnostic, IntoDiagnostic, ErrorGuaranteed, Handler}; use rustc_macros::{DiagnosticHandler, SessionSubdiagnostic}; use rustc_session::lint::Level; use rustc_span::{Span, Symbol}; @@ -22,7 +22,7 @@ pub enum OverruledAttributeSub { CommandLineSource, } -impl AddSubdiagnostic for OverruledAttributeSub { +impl AddToDiagnostic for OverruledAttributeSub { fn add_to_diagnostic(self, diag: &mut rustc_errors::Diagnostic) { match self { OverruledAttributeSub::DefaultSource { id } => { @@ -87,7 +87,7 @@ pub struct RequestedLevel { pub lint_name: String, } -impl AddSubdiagnostic for RequestedLevel { +impl AddToDiagnostic for RequestedLevel { fn add_to_diagnostic(self, diag: &mut rustc_errors::Diagnostic) { diag.note(fluent::lint::requested_level); diag.set_arg( diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index dec75c9d380..47da8ec5da1 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -372,7 +372,7 @@ declare_tool_lint! { declare_tool_lint! { pub rustc::DIAGNOSTIC_OUTSIDE_OF_IMPL, Allow, - "prevent creation of diagnostics outside of `DiagnosticHandler`/`AddSubdiagnostic` impls", + "prevent creation of diagnostics outside of `DiagnosticHandler`/`AddToDiagnostic` impls", report_in_external_macro: true } |
