Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit a2074e5

Browse files
committed
Remove remnants of the checked feature
The Cargo feature `checked` was added in d166a30 ("Overhaul tests") and later removed in 5e0eca7 ("swap stable to be unstable, checked is now debug_assertions"). However, there are a few remaining uses of `feature = "checked"` that did not get removed. Clean these up here.
1 parent 46a3bce commit a2074e5

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

build.rs

+7-12
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,13 @@ fn main() {
88
println!("cargo:rerun-if-changed=build.rs");
99
println!("cargo:rustc-check-cfg=cfg(assert_no_panic)");
1010

11-
println!("cargo:rustc-check-cfg=cfg(feature, values(\"checked\"))");
12-
13-
#[allow(unexpected_cfgs)]
14-
if !cfg!(feature = "checked") {
15-
let lvl = env::var("OPT_LEVEL").unwrap();
16-
if lvl != "0" && !cfg!(debug_assertions) {
17-
println!("cargo:rustc-cfg=assert_no_panic");
18-
} else if env::var("ENSURE_NO_PANIC").is_ok() {
19-
// Give us a defensive way of ensureing that no-panic is checked when we
20-
// expect it to be.
21-
panic!("`assert_no_panic `was not enabled");
22-
}
11+
let lvl = env::var("OPT_LEVEL").unwrap();
12+
if lvl != "0" && !cfg!(debug_assertions) {
13+
println!("cargo:rustc-cfg=assert_no_panic");
14+
} else if env::var("ENSURE_NO_PANIC").is_ok() {
15+
// Give us a defensive way of ensureing that no-panic is checked when we
16+
// expect it to be.
17+
panic!("`assert_no_panic `was not enabled");
2318
}
2419

2520
configure::emit_libm_config(&cfg);

crates/compiler-builtins-smoke-test/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ unexpected_cfgs = { level = "warn", check-cfg = [
2222
"cfg(arch_enabled)",
2323
"cfg(assert_no_panic)",
2424
"cfg(intrinsics_enabled)",
25-
'cfg(feature, values("checked"))',
2625
'cfg(feature, values("force-soft-floats"))',
2726
'cfg(feature, values("unstable"))',
2827
'cfg(feature, values("unstable-intrinsics"))',

src/math/rem_pio2_large.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ pub(crate) fn rem_pio2_large(x: &[f64], y: &mut [f64], e0: i32, prec: usize) ->
226226
let x1p24 = f64::from_bits(0x4170000000000000); // 0x1p24 === 2 ^ 24
227227
let x1p_24 = f64::from_bits(0x3e70000000000000); // 0x1p_24 === 2 ^ (-24)
228228

229-
#[cfg(all(target_pointer_width = "64", feature = "checked"))]
230-
assert!(e0 <= 16360);
229+
if cfg!(target_pointer_width = "64") {
230+
debug_assert!(e0 <= 16360);
231+
}
231232

232233
let nx = x.len();
233234

0 commit comments

Comments
 (0)