File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
crates/rustc_codegen_spirv/src Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -621,20 +621,15 @@ fn get_env_dump_dir(env_var: &str) -> Option<PathBuf> {
621
621
/// This is the entrypoint for a hot plugged `rustc_codegen_spirv`
622
622
#[ no_mangle]
623
623
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
+ } ) ) ;
638
633
639
634
Box :: new ( SpirvCodegenBackend )
640
635
}
You can’t perform that action at this time.
0 commit comments