Skip to content

Commit 2268222

Browse files
committed
Trust the "i128" feature
If the "i128" feature is explicity requested, don't bother probing for it. It will still cause a build error if that was set improperly.
1 parent cc05da6 commit 2268222

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ extern crate autocfg;
33
use std::env;
44

55
fn main() {
6-
let ac = autocfg::new();
7-
if ac.probe_type("i128") {
8-
println!("cargo:rustc-cfg=has_i128");
9-
} else if env::var_os("CARGO_FEATURE_I128").is_some() {
10-
panic!("i128 support was not detected!");
6+
// If the "i128" feature is explicity requested, don't bother probing for it.
7+
// It will still cause a build error if that was set improperly.
8+
if env::var_os("CARGO_FEATURE_I128").is_some() || autocfg::new().probe_type("i128") {
9+
autocfg::emit("has_i128");
1110
}
1211

1312
autocfg::rerun_path("build.rs");

0 commit comments

Comments
 (0)