Skip to content

Commit

Permalink
Adjust Diag::new signature.
Browse files Browse the repository at this point in the history
Make it use `impl Into<DiagMessage>` like all the other methods nearby.
  • Loading branch information
nnethercote committed Mar 4, 2024
1 parent 0ab373b commit bbd1242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_errors/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit bbd1242

Please sign in to comment.