diff --git a/mozglue/static/rust/build.rs b/mozglue/static/rust/build.rs index a4c4d6bcaaef..aa28a99dd195 100644 --- a/mozglue/static/rust/build.rs +++ b/mozglue/static/rust/build.rs @@ -21,16 +21,8 @@ fn main() { // code in tree, but the version here is such that it's effectively never used. let max_alloc_error_panic_version = Version::parse("1.88.0-alpha").unwrap(); - if ver >= Version::parse("1.80.0-alpha").unwrap() { - println!("cargo::rustc-check-cfg=cfg(has_panic_hook_info)"); - println!("cargo::rustc-check-cfg=cfg(oom_with, values(\"hook\", \"alloc_error_panic\"))"); - } - // As of 1.81, std::panic::PanicInfo is deprecated and replaced by - // std::panic::PanicHookInfo. Using the former becomes a warning in - // 1.82, but we can use the new type as of 1.81. - if ver >= Version::parse("1.81.0-beta").unwrap() { - println!("cargo:rustc-cfg=has_panic_hook_info"); - } + println!("cargo::rustc-check-cfg=cfg(has_panic_hook_info)"); + println!("cargo::rustc-check-cfg=cfg(oom_with, values(\"hook\", \"alloc_error_panic\"))"); if ver < max_oom_hook_version { println!("cargo:rustc-cfg=oom_with=\"hook\""); } else if ver < max_alloc_error_panic_version { diff --git a/mozglue/static/rust/lib.rs b/mozglue/static/rust/lib.rs index b46b6ad6d55b..783d4a6d2c75 100644 --- a/mozglue/static/rust/lib.rs +++ b/mozglue/static/rust/lib.rs @@ -13,10 +13,7 @@ use std::os::raw::c_char; use std::os::raw::c_int; use std::os::raw::c_void; use std::panic; -#[cfg(has_panic_hook_info)] use std::panic::PanicHookInfo; -#[cfg(not(has_panic_hook_info))] -use std::panic::PanicInfo as PanicHookInfo; #[link(name = "wrappers")] extern "C" {