about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-30 15:27:16 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-30 18:46:06 +1100
commit5350edb9e8f4e194a2cad9a41b81d97a8ed52fab (patch)
tree6f27f6b0491a3c791c3384dc3629a9a3934432ff /src
parentfb4bca04fa1bde2f7db1b31a59e066f7bebd7fc6 (diff)
downloadrust-5350edb9e8f4e194a2cad9a41b81d97a8ed52fab.tar.gz
rust-5350edb9e8f4e194a2cad9a41b81d97a8ed52fab.zip
Remove the lifetime from `DiagnosticArgValue`.
Because it's almost always static.

This makes `impl IntoDiagnosticArg for DiagnosticArgValue` trivial,
which is nice.

There are a few diagnostics constructed in
`compiler/rustc_mir_build/src/check_unsafety.rs` and
`compiler/rustc_mir_transform/src/errors.rs` that now need symbols
converted to `String` with `to_string` instead of `&str` with `as_str`,
but that' no big deal, and worth it for the simplifications elsewhere.
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/src/diagnostics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs
index bf3284df596..92c58d48dc7 100644
--- a/src/tools/miri/src/diagnostics.rs
+++ b/src/tools/miri/src/diagnostics.rs
@@ -104,7 +104,7 @@ impl MachineStopType for TerminationInfo {
         self: Box<Self>,
         _: &mut dyn FnMut(
             std::borrow::Cow<'static, str>,
-            rustc_errors::DiagnosticArgValue<'static>,
+            rustc_errors::DiagnosticArgValue,
         ),
     ) {
     }