Skip to content

Commit 627156b

Browse files
committed
Revert change superseded by #732
1 parent 4f67353 commit 627156b

File tree

1 file changed

+9
-14
lines changed
  • crates/rustc_codegen_spirv/src

1 file changed

+9
-14
lines changed

crates/rustc_codegen_spirv/src/lib.rs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -621,20 +621,15 @@ fn get_env_dump_dir(env_var: &str) -> Option<PathBuf> {
621621
/// This is the entrypoint for a hot plugged `rustc_codegen_spirv`
622622
#[no_mangle]
623623
pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
624-
// Setting the hook nukes the backtrace, so give developers an escape hatch to see the crash,
625-
// even if the message is wrong.
626-
// TODO: Figure out a way to print both the backtrace and override the bug report URL.
627-
if env::var_os("NO_PANIC_HOOK").is_none() {
628-
// Override rustc's panic hook with our own to override the ICE error
629-
// message, and direct people to `rust-gpu`.
630-
std::panic::set_hook(Box::new(|panic_info| {
631-
rustc_driver::report_ice(
632-
panic_info,
633-
"https://github.com/EmbarkStudios/rust-gpu/issues/new",
634-
);
635-
eprintln!("note: `rust-gpu` version {}\n", env!("CARGO_PKG_VERSION"));
636-
}));
637-
}
624+
// Override rustc's panic hook with our own to override the ICE error
625+
// message, and direct people to `rust-gpu`.
626+
std::panic::set_hook(Box::new(|panic_info| {
627+
rustc_driver::report_ice(
628+
panic_info,
629+
"https://github.com/EmbarkStudios/rust-gpu/issues/new",
630+
);
631+
eprintln!("note: `rust-gpu` version {}\n", env!("CARGO_PKG_VERSION"));
632+
}));
638633

639634
Box::new(SpirvCodegenBackend)
640635
}

0 commit comments

Comments
 (0)