INNER CODE UNIT · Rust

drop

EmbarkStudios/rust-gpu · crates/rustc_codegen_spirv/src/lib.rs:485

    fn drop(&mut self) {
        if std::thread::panicking() {
            if self.path.has_root() {
                self.cx.builder.dump_module(self.path);
            } else {
                println!("{}", self.cx.builder.dump_module_str());
            }
        }
    }
}

/// This is the entrypoint for a hot plugged `rustc_codegen_spirv`
#[no_mangle]
pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
    // Tweak rustc's default ICE panic hook, to direct people to `rust-gpu`.
    rustc_driver::install_ice_hook(
        "https://github.com/EmbarkStudios/rust-gpu/issues/new",
        |handler| {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…