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_codegen_ssa/src | |
| 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_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/errors.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper { - fn into_diagnostic(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> { +impl<G: EmissionGuarantee> 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<G: EmissionGuarantee> IntoDiagnostic<'_, G> for LinkingFailed<'_> { - fn into_diagnostic(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> { +impl<G: EmissionGuarantee> 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)); |
