Skip to content

Commit e4b1e80

Browse files
committed
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.
1 parent 5475680 commit e4b1e80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl MachineStopType for TerminationInfo {
104104
self: Box<Self>,
105105
_: &mut dyn FnMut(
106106
std::borrow::Cow<'static, str>,
107-
rustc_errors::DiagnosticArgValue<'static>,
107+
rustc_errors::DiagnosticArgValue,
108108
),
109109
) {
110110
}

0 commit comments

Comments
 (0)