From bbd1242bfde08b6af98add76e1fc9f2bae6bf7a2 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sat, 2 Mar 2024 08:56:40 +1100 Subject: [PATCH] Adjust `Diag::new` signature. Make it use `impl Into` like all the other methods nearby. --- compiler/rustc_errors/src/diagnostic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 9d73d4edb7d01..5390dda9b21ad 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>(dcx: &'a DiagCtxt, level: Level, message: M) -> Self { + pub fn new(dcx: &'a DiagCtxt, level: Level, message: impl Into) -> Self { Self::new_diagnostic(dcx, DiagInner::new(level, message)) }