Skip to content

Commit 3007712

Browse files
committed
Don't use an explicit copysign feature
1 parent 30f8d3a commit 3007712

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ libm = { version = "0.2.0", optional = true }
2323
default = ["std"]
2424
std = []
2525
i128 = []
26-
copysign = []
2726

2827
[build-dependencies]
2928
autocfg = "1"

build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ fn main() {
1111
autocfg::emit("has_i128");
1212
}
1313

14-
if env::var_os("CARGO_FEATURE_COPYSIGN").is_some() || ac.probe_expression("f32::copysign") {
15-
autocfg::emit("has_copysign");
16-
}
17-
1814
ac.emit_expression_cfg(
1915
"unsafe { 1f64.to_int_unchecked::<i32>() }",
2016
"has_to_int_unchecked",
@@ -25,5 +21,9 @@ fn main() {
2521
ac.emit_expression_cfg("{ let mut x = 1; x += &2; }", "has_int_assignop_ref");
2622
ac.emit_expression_cfg("1u32.div_euclid(1u32)", "has_div_euclid");
2723

24+
if env::var_os("CARGO_FEATURE_STD").is_some() {
25+
ac.emit_expression_cfg("1f64.copysign(-1f64)", "has_copysign");
26+
}
27+
2828
autocfg::rerun_path("build.rs");
2929
}

0 commit comments

Comments
 (0)