Bug 1948842 - Remove mozglue code specific to rust < 1.82. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D238562
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user