Modify main message to be more conversational and emit one fewer note.
if !info.payload().is::<rustc_errors::ExplicitBug>()
&& !info.payload().is::<rustc_errors::DelayedBugPanic>()
{
- let mut d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic");
- handler.emit_diagnostic(&mut d);
+ handler.emit_err(session_diagnostics::Ice);
}
- handler.emit_note(session_diagnostics::Ice);
handler.emit_note(session_diagnostics::IceBugReport { bug_report_url });
handler.emit_note(session_diagnostics::IceVersion {
version: util::version_str!().unwrap_or("unknown_version"),
// compile-flags: -Ztreat-err-as-bug=1
// failure-status: 101
// rustc-env:RUST_BACKTRACE=1
-// normalize-stderr-test "\nerror: internal compiler error.*\n\n" -> ""
-// normalize-stderr-test "note:.*unexpectedly panicked.*\n\n" -> ""
+// normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> ""
// normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
// normalize-stderr-test "note: compiler flags.*\n\n" -> ""
// normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
error[E0080]: evaluation of constant value failed
- --> $DIR/const-eval-query-stack.rs:17:16
+ --> $DIR/const-eval-query-stack.rs:16:16
|
LL | const X: i32 = 1 / 0;
| ^^^^^ attempt to divide `1_i32` by zero
// known-bug: #106191
// unset-rustc-env:RUST_BACKTRACE
// had to be reverted
-// error-pattern:internal compiler error
+// error-pattern:unexpectedly panicked
// failure-status:101
// dont-check-compiler-stderr
stack backtrace:
-error: internal compiler error: unexpected panic
-
-
+error: the compiler unexpectedly panicked. this is a bug.
-error: internal compiler error: unexpected panic
+error: the compiler unexpectedly panicked. this is a bug.
query stack during panic:
#0 [layout_of] computing layout of `Foo`
stack backtrace:
-error: internal compiler error: unexpected panic
-
-
+error: the compiler unexpectedly panicked. this is a bug.
LL | fn main() {}
| ^^^^^^^^^
-error: internal compiler error: unexpected panic
+error: the compiler unexpectedly panicked. this is a bug.
query stack during panic:
#0 [trigger_delay_span_bug] triggering a delay span bug
LL | pub static C: u32 = 0 - 1;
| ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
-error: internal compiler error: unexpected panic
+error: the compiler unexpectedly panicked. this is a bug.
query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `C`