diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index aae2910537a..068d2aaba15 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1101,22 +1101,22 @@ impl Handler { #[rustc_lint_diagnostics] pub fn fatal(&self, msg: impl Into) -> ! { - DiagnosticBuilder::::new(self, Fatal, msg).emit().raise() + self.struct_fatal(msg).emit() } #[rustc_lint_diagnostics] pub fn err(&self, msg: impl Into) -> ErrorGuaranteed { - DiagnosticBuilder::::new(self, Error { lint: false }, msg).emit() + self.struct_err(msg).emit() } #[rustc_lint_diagnostics] pub fn warn(&self, msg: impl Into) { - DiagnosticBuilder::<()>::new(self, Warning(None), msg).emit(); + self.struct_warn(msg).emit() } #[rustc_lint_diagnostics] pub fn note(&self, msg: impl Into) { - DiagnosticBuilder::<()>::new(self, Note, msg).emit(); + self.struct_note(msg).emit() } pub fn bug(&self, msg: impl Into) -> ! {