Make Handler::{err,bug}
more like Handler::{warn,note}
.
This commit is contained in:
parent
883bdb7fda
commit
3ab05caa4d
1 changed files with 3 additions and 10 deletions
|
@ -1096,10 +1096,7 @@ impl Handler {
|
|||
|
||||
#[rustc_lint_diagnostics]
|
||||
pub fn err(&self, msg: impl Into<DiagnosticMessage>) -> ErrorGuaranteed {
|
||||
self.inner
|
||||
.borrow_mut()
|
||||
.emit_diagnostic(&mut Diagnostic::new(Error { lint: false }, msg))
|
||||
.unwrap()
|
||||
DiagnosticBuilder::<ErrorGuaranteed>::new(self, Error { lint: false }, msg).emit()
|
||||
}
|
||||
|
||||
#[rustc_lint_diagnostics]
|
||||
|
@ -1113,7 +1110,8 @@ impl Handler {
|
|||
}
|
||||
|
||||
pub fn bug(&self, msg: impl Into<DiagnosticMessage>) -> ! {
|
||||
self.inner.borrow_mut().bug(msg)
|
||||
DiagnosticBuilder::<diagnostic_builder::Bug>::new(self, Bug, msg).emit();
|
||||
panic::panic_any(ExplicitBug);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -1601,11 +1599,6 @@ impl HandlerInner {
|
|||
FatalError
|
||||
}
|
||||
|
||||
fn bug(&mut self, msg: impl Into<DiagnosticMessage>) -> ! {
|
||||
self.emit_diagnostic(&mut Diagnostic::new(Bug, msg));
|
||||
panic::panic_any(ExplicitBug);
|
||||
}
|
||||
|
||||
fn flush_delayed(
|
||||
&mut self,
|
||||
bugs: impl IntoIterator<Item = DelayedDiagnostic>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue