Auto merge of #122132 - nnethercote:diag-renaming3, r=nnethercote

Diagnostic renaming 3

A sequel to https://github.com/rust-lang/rust/pull/121780.

r? `@davidtwco`
This commit is contained in:
bors 2024-03-11 00:34:44 +00:00
commit cd81f5b27e
78 changed files with 567 additions and 586 deletions

View file

@ -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) {