Skip to content

Commit bbd1242

Browse files
committed
Adjust Diag::new signature.
Make it use `impl Into<DiagMessage>` like all the other methods nearby.
1 parent 0ab373b commit bbd1242

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_errors/src/diagnostic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ macro_rules! with_fn {
577577
impl<'a, G: EmissionGuarantee> Diag<'a, G> {
578578
#[rustc_lint_diagnostics]
579579
#[track_caller]
580-
pub fn new<M: Into<DiagMessage>>(dcx: &'a DiagCtxt, level: Level, message: M) -> Self {
580+
pub fn new(dcx: &'a DiagCtxt, level: Level, message: impl Into<DiagMessage>) -> Self {
581581
Self::new_diagnostic(dcx, DiagInner::new(level, message))
582582
}
583583

0 commit comments

Comments
 (0)