File tree 1 file changed +11
-8
lines changed
compiler/rustc_driver/src
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -1151,23 +1151,26 @@ pub fn catch_with_exit_code(f: impl FnOnce() -> interface::Result<()>) -> i32 {
1151
1151
static DEFAULT_HOOK : SyncLazy < Box < dyn Fn ( & panic:: PanicInfo < ' _ > ) + Sync + Send + ' static > > =
1152
1152
SyncLazy :: new ( || {
1153
1153
let hook = panic:: take_hook ( ) ;
1154
- panic:: set_hook ( Box :: new ( |info| report_ice ( info, BUG_REPORT_URL ) ) ) ;
1154
+ panic:: set_hook ( Box :: new ( |info| {
1155
+ // Invoke the default handler, which prints the actual panic message and optionally a backtrace
1156
+ ( * DEFAULT_HOOK ) ( info) ;
1157
+
1158
+ // Separate the output with an empty line
1159
+ eprintln ! ( ) ;
1160
+
1161
+ // Print the ICE message
1162
+ report_ice ( info, BUG_REPORT_URL ) ;
1163
+ } ) ) ;
1155
1164
hook
1156
1165
} ) ;
1157
1166
1158
- /// Prints the ICE message, including backtrace and query stack.
1167
+ /// Prints the ICE message, including query stack, but without backtrace .
1159
1168
///
1160
1169
/// The message will point the user at `bug_report_url` to report the ICE.
1161
1170
///
1162
1171
/// When `install_ice_hook` is called, this function will be called as the panic
1163
1172
/// hook.
1164
1173
pub fn report_ice ( info : & panic:: PanicInfo < ' _ > , bug_report_url : & str ) {
1165
- // Invoke the default handler, which prints the actual panic message and optionally a backtrace
1166
- ( * DEFAULT_HOOK ) ( info) ;
1167
-
1168
- // Separate the output with an empty line
1169
- eprintln ! ( ) ;
1170
-
1171
1174
let emitter = Box :: new ( rustc_errors:: emitter:: EmitterWriter :: stderr (
1172
1175
rustc_errors:: ColorConfig :: Auto ,
1173
1176
None ,
You can’t perform that action at this time.
0 commit comments