1
Fork 0

Rollup merge of #120488 - nnethercote:diag-lifetimes, r=oli-obk

Diagnostic lifetimes cleanups

Some diagnostic simplifications.

r? `@oli-obk`
This commit is contained in:
Guillaume Gomez 2024-01-30 11:19:20 +01:00 committed by GitHub
commit f99b510429
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 144 additions and 150 deletions

View file

@ -34,7 +34,7 @@ impl MachineStopType for ConstEvalErrKind {
}
fn add_args(
self: Box<Self>,
adder: &mut dyn FnMut(std::borrow::Cow<'static, str>, DiagnosticArgValue<'static>),
adder: &mut dyn FnMut(std::borrow::Cow<'static, str>, DiagnosticArgValue),
) {
use ConstEvalErrKind::*;
match *self {

View file

@ -906,7 +906,7 @@ impl ReportErrorExt for ResourceExhaustionInfo {
}
impl rustc_errors::IntoDiagnosticArg for InternKind {
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
DiagnosticArgValue::Str(Cow::Borrowed(match self {
InternKind::Static(Mutability::Not) => "static",
InternKind::Static(Mutability::Mut) => "static_mut",