mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Tweak ICE message
Modify main message to be more conversational and emit one fewer note.
This commit is contained in:
parent
e4dd9edb76
commit
a7597a1526
@ -1200,11 +1200,9 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
|
||||
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"),
|
||||
|
@ -1,8 +1,7 @@
|
||||
// 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" -> ""
|
||||
|
@ -1,5 +1,5 @@
|
||||
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
|
||||
|
@ -3,7 +3,7 @@
|
||||
// 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
|
||||
|
||||
|
@ -9,9 +9,7 @@ LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResu
|
||||
|
||||
stack backtrace:
|
||||
|
||||
error: internal compiler error: unexpected panic
|
||||
|
||||
|
||||
error: the compiler unexpectedly panicked. this is a bug.
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
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`
|
||||
|
@ -4,9 +4,7 @@ LL | fn main() { missing_ident; }
|
||||
|
||||
stack backtrace:
|
||||
|
||||
error: internal compiler error: unexpected panic
|
||||
|
||||
|
||||
error: the compiler unexpectedly panicked. this is a bug.
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ error: internal compiler error: delayed span bug triggered by #[rustc_error(dela
|
||||
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
|
||||
|
@ -4,7 +4,7 @@ error[E0080]: could not evaluate static initializer
|
||||
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`
|
||||
|
Loading…
Reference in New Issue
Block a user