about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src/lib.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-02-07 19:17:24 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-02-07 19:17:24 +0000
commita7597a15265df589b29ed3c61a3047994fc45d0a (patch)
treebb0a6de5b46a4505d7dae198e3a7e88e3b5d96eb /compiler/rustc_driver_impl/src/lib.rs
parente4dd9edb76a34ecbca539967f9662b8c0cc9c7fb (diff)
downloadrust-a7597a15265df589b29ed3c61a3047994fc45d0a.tar.gz
rust-a7597a15265df589b29ed3c61a3047994fc45d0a.zip
Tweak ICE message
Modify main message to be more conversational and emit one fewer note.
Diffstat (limited to 'compiler/rustc_driver_impl/src/lib.rs')
-rw-r--r--compiler/rustc_driver_impl/src/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs
index 02e0b042ad2..66ed9ffe918 100644
--- a/compiler/rustc_driver_impl/src/lib.rs
+++ b/compiler/rustc_driver_impl/src/lib.rs
@@ -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"),