diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-05-23 03:50:43 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-05-23 04:08:35 +0200 |
| commit | 9f67c50128f7ef57295c5f9b56e22031f4ed8d03 (patch) | |
| tree | 4cf2d07dc800dfd53e567944f539e24e1001f81e /compiler/rustc_error_messages | |
| parent | 06bc4fc67145e3a7be9b5a2cf2b5968cef36e587 (diff) | |
| download | rust-9f67c50128f7ef57295c5f9b56e22031f4ed8d03.tar.gz rust-9f67c50128f7ef57295c5f9b56e22031f4ed8d03.zip | |
Remove `DelayDm`
With the removal of `LintDiagnostic::msg` / the `msg` param from lint diag APIs, primary messages for lint diags are always constructed lazily inside decorator fns rendering this wrapper type unused / useless.
Diffstat (limited to 'compiler/rustc_error_messages')
| -rw-r--r-- | compiler/rustc_error_messages/src/lib.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs index ad82c2d96e7..c04386c03f2 100644 --- a/compiler/rustc_error_messages/src/lib.rs +++ b/compiler/rustc_error_messages/src/lib.rs @@ -367,17 +367,6 @@ impl From<Cow<'static, str>> for DiagMessage { } } -/// A workaround for must_produce_diag ICEs when formatting types in disabled lints. -/// -/// Delays formatting until `.into(): DiagMessage` is used. -pub struct DelayDm<F>(pub F); - -impl<F: FnOnce() -> String> From<DelayDm<F>> for DiagMessage { - fn from(DelayDm(f): DelayDm<F>) -> Self { - DiagMessage::from(f()) - } -} - /// Translating *into* a subdiagnostic message from a diagnostic message is a little strange - but /// the subdiagnostic functions (e.g. `span_label`) take a `SubdiagMessage` and the /// subdiagnostic derive refers to typed identifiers that are `DiagMessage`s, so need to be |
