Rollup merge of #120488 - nnethercote:diag-lifetimes, r=oli-obk
Diagnostic lifetimes cleanups Some diagnostic simplifications. r? `@oli-obk`
This commit is contained in:
commit
f99b510429
39 changed files with 144 additions and 150 deletions
|
@ -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 {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue