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]
|
#[rustc_lint_diagnostics]
|
||||||
pub fn err(&self, msg: impl Into<DiagnosticMessage>) -> ErrorGuaranteed {
|
pub fn err(&self, msg: impl Into<DiagnosticMessage>) -> ErrorGuaranteed {
|
||||||
self.inner
|
DiagnosticBuilder::<ErrorGuaranteed>::new(self, Error { lint: false }, msg).emit()
|
||||||
.borrow_mut()
|
|
||||||
.emit_diagnostic(&mut Diagnostic::new(Error { lint: false }, msg))
|
|
||||||
.unwrap()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_lint_diagnostics]
|
#[rustc_lint_diagnostics]
|
||||||
|
@ -1113,7 +1110,8 @@ impl Handler {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn bug(&self, msg: impl Into<DiagnosticMessage>) -> ! {
|
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]
|
#[inline]
|
||||||
|
@ -1601,11 +1599,6 @@ impl HandlerInner {
|
||||||
FatalError
|
FatalError
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bug(&mut self, msg: impl Into<DiagnosticMessage>) -> ! {
|
|
||||||
self.emit_diagnostic(&mut Diagnostic::new(Bug, msg));
|
|
||||||
panic::panic_any(ExplicitBug);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn flush_delayed(
|
fn flush_delayed(
|
||||||
&mut self,
|
&mut self,
|
||||||
bugs: impl IntoIterator<Item = DelayedDiagnostic>,
|
bugs: impl IntoIterator<Item = DelayedDiagnostic>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue