From 7a294e998b66ea6d410a6840cba80347fc4764c2 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 6 Mar 2024 11:02:56 +1100 Subject: Rename `IntoDiagnostic` as `Diagnostic`. To match `derive(Diagnostic)`. Also rename `into_diagnostic` as `into_diag`. --- compiler/rustc_codegen_ssa/src/errors.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_codegen_ssa/src') diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs index 04aed7086f8..3572ee301c8 100644 --- a/compiler/rustc_codegen_ssa/src/errors.rs +++ b/compiler/rustc_codegen_ssa/src/errors.rs @@ -4,7 +4,7 @@ use crate::assert_module_sources::CguReuse; use crate::back::command::Command; use crate::fluent_generated as fluent; use rustc_errors::{ - codes::*, Diag, DiagArgValue, DiagCtxt, EmissionGuarantee, IntoDiagArg, IntoDiagnostic, Level, + codes::*, Diag, DiagArgValue, DiagCtxt, Diagnostic, EmissionGuarantee, IntoDiagArg, Level, }; use rustc_macros::Diagnostic; use rustc_middle::ty::layout::LayoutError; @@ -214,8 +214,8 @@ pub enum LinkRlibError { pub struct ThorinErrorWrapper(pub thorin::Error); -impl IntoDiagnostic<'_, G> for ThorinErrorWrapper { - fn into_diagnostic(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> { +impl Diagnostic<'_, G> for ThorinErrorWrapper { + fn into_diag(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> { let build = |msg| Diag::new(dcx, level, msg); match self.0 { thorin::Error::ReadInput(_) => build(fluent::codegen_ssa_thorin_read_input_failure), @@ -347,8 +347,8 @@ pub struct LinkingFailed<'a> { pub escaped_output: String, } -impl IntoDiagnostic<'_, G> for LinkingFailed<'_> { - fn into_diagnostic(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> { +impl Diagnostic<'_, G> for LinkingFailed<'_> { + fn into_diag(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> { let mut diag = Diag::new(dcx, level, fluent::codegen_ssa_linking_failed); diag.arg("linker_path", format!("{}", self.linker_path.display())); diag.arg("exit_status", format!("{}", self.exit_status)); -- cgit 1.4.1-3-g733a5