diff options
| author | bors <bors@rust-lang.org> | 2024-03-11 00:34:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-11 00:34:44 +0000 |
| commit | cd81f5b27ee00b49d413db50b5e6af871cebcf23 (patch) | |
| tree | de825c76d6714c2be261ff363eb2c840c2484578 /compiler/rustc_const_eval/src/errors.rs | |
| parent | 76ee6fc926032c16a5706086922fc1125c061b70 (diff) | |
| parent | 43c06335cf2d1cc6b12fcfa5b8795d9becc52e8c (diff) | |
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`
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/errors.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index afabd9689c6..249c02b75f7 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use rustc_errors::{ - codes::*, Diag, DiagArgValue, DiagCtxt, DiagMessage, EmissionGuarantee, IntoDiagnostic, Level, + codes::*, Diag, DiagArgValue, DiagCtxt, DiagMessage, Diagnostic, EmissionGuarantee, Level, }; use rustc_hir::ConstContext; use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; @@ -239,7 +239,7 @@ pub(crate) struct NonConstImplNote { pub span: Span, } -#[derive(Subdiagnostic, PartialEq, Eq, Clone)] +#[derive(Subdiagnostic, Clone)] #[note(const_eval_frame_note)] pub struct FrameNote { #[primary_span] @@ -858,8 +858,7 @@ impl<'tcx> ReportErrorExt for InvalidProgramInfo<'tcx> { InvalidProgramInfo::Layout(e) => { // The level doesn't matter, `dummy_diag` is consumed without it being used. let dummy_level = Level::Bug; - let dummy_diag: Diag<'_, ()> = - e.into_diagnostic().into_diagnostic(diag.dcx, dummy_level); + let dummy_diag: Diag<'_, ()> = e.into_diagnostic().into_diag(diag.dcx, dummy_level); for (name, val) in dummy_diag.args.iter() { diag.arg(name.clone(), val.clone()); } @@ -887,8 +886,8 @@ impl ReportErrorExt for ResourceExhaustionInfo { fn add_args<G: EmissionGuarantee>(self, _: &mut Diag<'_, G>) {} } -impl rustc_errors::IntoDiagnosticArg for InternKind { - fn into_diagnostic_arg(self) -> DiagArgValue { +impl rustc_errors::IntoDiagArg for InternKind { + fn into_diag_arg(self) -> DiagArgValue { DiagArgValue::Str(Cow::Borrowed(match self { InternKind::Static(Mutability::Not) => "static", InternKind::Static(Mutability::Mut) => "static_mut", |
