Adjust Diag::new
signature.
Make it use `impl Into<DiagMessage>` like all the other methods nearby.
This commit is contained in:
parent
5cce28725f
commit
1cd957498b
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user