diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-06 11:02:56 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-11 09:15:09 +1100 |
| commit | 7a294e998b66ea6d410a6840cba80347fc4764c2 (patch) | |
| tree | aa7a68bfbbb9177a06cda144baca657f4939996b /compiler/rustc_monomorphize/src/errors.rs | |
| parent | a09b1d33a703d4ed412e70d3197e73ba7e0937f9 (diff) | |
| download | rust-7a294e998b66ea6d410a6840cba80347fc4764c2.tar.gz rust-7a294e998b66ea6d410a6840cba80347fc4764c2.zip | |
Rename `IntoDiagnostic` as `Diagnostic`.
To match `derive(Diagnostic)`. Also rename `into_diagnostic` as `into_diag`.
Diffstat (limited to 'compiler/rustc_monomorphize/src/errors.rs')
| -rw-r--r-- | compiler/rustc_monomorphize/src/errors.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/errors.rs b/compiler/rustc_monomorphize/src/errors.rs index 1303ac9939c..35fc78f2045 100644 --- a/compiler/rustc_monomorphize/src/errors.rs +++ b/compiler/rustc_monomorphize/src/errors.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use crate::fluent_generated as fluent; -use rustc_errors::{Diag, DiagCtxt, EmissionGuarantee, IntoDiagnostic, Level}; +use rustc_errors::{Diag, DiagCtxt, Diagnostic, EmissionGuarantee, Level}; use rustc_macros::{Diagnostic, LintDiagnostic}; use rustc_span::{Span, Symbol}; @@ -46,9 +46,9 @@ pub struct UnusedGenericParamsHint { pub param_names: Vec<String>, } -impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for UnusedGenericParamsHint { +impl<G: EmissionGuarantee> Diagnostic<'_, G> for UnusedGenericParamsHint { #[track_caller] - fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> { + fn into_diag(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> { let mut diag = Diag::new(dcx, level, fluent::monomorphize_unused_generic_params); diag.span(self.span); for (span, name) in self.param_spans.into_iter().zip(self.param_names) { |
