Adjust Diag::new signature.

Make it use `impl Into<DiagMessage>` like all the other methods nearby.
This commit is contained in:
Nicholas Nethercote 2024-03-02 08:56:40 +11:00
parent 5cce28725f
commit 1cd957498b

View File

@ -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))
}