We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3196236 commit 0ff6935Copy full SHA for 0ff6935
build.rs
@@ -4,11 +4,13 @@ use std::env;
4
5
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!");
+
+ // 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.
+ if env::var_os("CARGO_FEATURE_I128").is_some() || ac.probe_type("i128") {
11
+ autocfg::emit("has_i128");
12
}
13
14
ac.emit_expression_cfg(
15
"unsafe { 1f64.to_int_unchecked::<i32>() }",
16
"has_to_int_unchecked",
0 commit comments