about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/errors.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-03-06 11:02:56 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-03-11 09:15:09 +1100
commit7a294e998b66ea6d410a6840cba80347fc4764c2 (patch)
treeaa7a68bfbbb9177a06cda144baca657f4939996b /compiler/rustc_builtin_macros/src/errors.rs
parenta09b1d33a703d4ed412e70d3197e73ba7e0937f9 (diff)
downloadrust-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_builtin_macros/src/errors.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/errors.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_builtin_macros/src/errors.rs b/compiler/rustc_builtin_macros/src/errors.rs
index 06302ae577a..768bb105905 100644
--- a/compiler/rustc_builtin_macros/src/errors.rs
+++ b/compiler/rustc_builtin_macros/src/errors.rs
@@ -1,5 +1,5 @@
 use rustc_errors::{
-    codes::*, AddToDiagnostic, Diag, DiagCtxt, EmissionGuarantee, IntoDiagnostic, Level, MultiSpan,
+    codes::*, AddToDiagnostic, Diag, DiagCtxt, Diagnostic, EmissionGuarantee, Level, MultiSpan,
     SingleLabelManySpans, SubdiagMessageOp,
 };
 use rustc_macros::{Diagnostic, Subdiagnostic};
@@ -425,9 +425,9 @@ pub(crate) struct EnvNotDefinedWithUserMessage {
 }
 
 // Hand-written implementation to support custom user messages.
-impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G> for EnvNotDefinedWithUserMessage {
+impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for EnvNotDefinedWithUserMessage {
     #[track_caller]
-    fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> {
+    fn into_diag(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> {
         #[expect(
             rustc::untranslatable_diagnostic,
             reason = "cannot translate user-provided messages"
@@ -785,8 +785,8 @@ pub(crate) struct AsmClobberNoReg {
     pub(crate) clobbers: Vec<Span>,
 }
 
-impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G> for AsmClobberNoReg {
-    fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> {
+impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for AsmClobberNoReg {
+    fn into_diag(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> {
         // eager translation as `span_labels` takes `AsRef<str>`
         let lbl1 = dcx.eagerly_translate_to_string(
             crate::fluent_generated::builtin_macros_asm_clobber_abi,