about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/errors.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-23 10:20:45 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-28 08:55:35 +1100
commit899cb40809a85eb9d89f6da3268713b83175360a (patch)
treee4c9a526f3eeb5d8563bfe254f1507648fddede2 /compiler/rustc_monomorphize/src/errors.rs
parent4e1f9bd528aef7215bb3b446fcdf43368371da37 (diff)
downloadrust-899cb40809a85eb9d89f6da3268713b83175360a.tar.gz
rust-899cb40809a85eb9d89f6da3268713b83175360a.zip
Rename `DiagnosticBuilder` as `Diag`.
Much better!

Note that this involves renaming (and updating the value of)
`DIAGNOSTIC_BUILDER` in clippy.
Diffstat (limited to 'compiler/rustc_monomorphize/src/errors.rs')
-rw-r--r--compiler/rustc_monomorphize/src/errors.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_monomorphize/src/errors.rs b/compiler/rustc_monomorphize/src/errors.rs
index e4c30679146..1303ac9939c 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::{DiagCtxt, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, Level};
+use rustc_errors::{Diag, DiagCtxt, EmissionGuarantee, IntoDiagnostic, Level};
 use rustc_macros::{Diagnostic, LintDiagnostic};
 use rustc_span::{Span, Symbol};
 
@@ -48,9 +48,8 @@ pub struct UnusedGenericParamsHint {
 
 impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for UnusedGenericParamsHint {
     #[track_caller]
-    fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> {
-        let mut diag =
-            DiagnosticBuilder::new(dcx, level, fluent::monomorphize_unused_generic_params);
+    fn into_diagnostic(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) {
             // FIXME: I can figure out how to do a label with a fluent string with a fixed message,