Make panic/assert calls in rustc compatible with Rust 2021.
This commit is contained in:
parent
a616f8267e
commit
34d5ac25c5
3 changed files with 5 additions and 5 deletions
|
@ -901,7 +901,7 @@ impl HandlerInner {
|
|||
|
||||
fn span_bug(&mut self, sp: impl Into<MultiSpan>, msg: &str) -> ! {
|
||||
self.emit_diag_at_span(Diagnostic::new(Bug, msg), sp);
|
||||
panic!(ExplicitBug);
|
||||
panic::panic_any(ExplicitBug);
|
||||
}
|
||||
|
||||
fn emit_diag_at_span(&mut self, mut diag: Diagnostic, sp: impl Into<MultiSpan>) {
|
||||
|
@ -955,7 +955,7 @@ impl HandlerInner {
|
|||
|
||||
fn bug(&mut self, msg: &str) -> ! {
|
||||
self.emit_diagnostic(&Diagnostic::new(Bug, msg));
|
||||
panic!(ExplicitBug);
|
||||
panic::panic_any(ExplicitBug);
|
||||
}
|
||||
|
||||
fn delay_as_bug(&mut self, diagnostic: Diagnostic) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue