Merge pull request #28 from nicholasbishop/bishop-no-128-panic

Don't panic if autocfg probe fails
This commit is contained in:
Friedel Ziegelmayer 2021-07-29 10:43:29 +02:00 committed by GitHub
commit 56576b592f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,9 +4,7 @@ use std::env;
fn main() {
let ac = autocfg::new();
if ac.probe_type("i128") {
if ac.probe_type("i128") || env::var_os("CARGO_FEATURE_I128").is_some() {
println!("cargo:rustc-cfg=has_i128");
} else if env::var_os("CARGO_FEATURE_I128").is_some() {
panic!("i128 support was not detected!");
}
}
}