diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-02 08:56:40 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-05 12:15:13 +1100 |
| commit | 1cd957498bd4f42b69b87b4463ebde259d0a96c4 (patch) | |
| tree | 0c9c8dc6843bf9e30a6ab33cf88aa7c0b0f52611 /compiler/rustc_errors | |
| parent | 5cce28725f4a39c8b0564be4b567c96371ab2dfb (diff) | |
| download | rust-1cd957498bd4f42b69b87b4463ebde259d0a96c4.tar.gz rust-1cd957498bd4f42b69b87b4463ebde259d0a96c4.zip | |
Adjust `Diag::new` signature.
Make it use `impl Into<DiagMessage>` like all the other methods nearby.
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 9d73d4edb7d..5390dda9b21 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -577,7 +577,7 @@ macro_rules! with_fn { impl<'a, G: EmissionGuarantee> Diag<'a, G> { #[rustc_lint_diagnostics] #[track_caller] - pub fn new<M: Into<DiagMessage>>(dcx: &'a DiagCtxt, level: Level, message: M) -> Self { + pub fn new(dcx: &'a DiagCtxt, level: Level, message: impl Into<DiagMessage>) -> Self { Self::new_diagnostic(dcx, DiagInner::new(level, message)) } |
