diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-02-02 00:17:51 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2021-02-03 22:42:53 +0100 |
| commit | 34d5ac25c565a772c5974ab3b332644a9eff60f8 (patch) | |
| tree | 47b5c23a901e6ae0a81f3743d96e51120e42b0f7 /compiler/rustc_errors | |
| parent | a616f8267ed9b9c45cdef81346e98aae06a70990 (diff) | |
| download | rust-34d5ac25c565a772c5974ab3b332644a9eff60f8.tar.gz rust-34d5ac25c565a772c5974ab3b332644a9eff60f8.zip | |
Make panic/assert calls in rustc compatible with Rust 2021.
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index e184e929b07..aa882332099 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -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) { |
