about summary refs log tree commit diff
path: root/library/std/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-13 09:54:28 +0000
committerbors <bors@rust-lang.org>2025-05-13 09:54:28 +0000
commit4eca99a18eab3d4e28ed1ce3ee620d442955a470 (patch)
treec1cededa300478e23f6065a9fe8df8a3c14563ca /library/std/tests
parentf6b5da71ea5cc0643906e38178d54483a9bbf1bf (diff)
parent8ce7783c7cfff1f60134a7754db32ea86855dd89 (diff)
downloadrust-4eca99a18eab3d4e28ed1ce3ee620d442955a470.tar.gz
rust-4eca99a18eab3d4e28ed1ce3ee620d442955a470.zip
Auto merge of #140887 - pietroalbini:pa-bootstrap-update, r=compiler-errors
Stage0 bootstrap update

This PR [follows the release process](https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday) to update the stage0 compiler.

The only thing of note is https://github.com/rust-lang/rust/commit/58651d1b316e268fac2100c3ae37bb502a36b8ba, which was flagged by clippy as a correctness fix. I think allowing that lint in our case makes sense, but it's worth to have a second pair of eyes on it.

r? `@Mark-Simulacrum`
Diffstat (limited to 'library/std/tests')
-rw-r--r--library/std/tests/floats/f128.rs32
-rw-r--r--library/std/tests/floats/f16.rs30
-rw-r--r--library/std/tests/floats/lib.rs4
3 files changed, 2 insertions, 64 deletions
diff --git a/library/std/tests/floats/f128.rs b/library/std/tests/floats/f128.rs
index 8b13d6e6558..c2618f3b315 100644
--- a/library/std/tests/floats/f128.rs
+++ b/library/std/tests/floats/f128.rs
@@ -1,11 +1,9 @@
 // FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
-#![cfg(not(bootstrap))]
 #![cfg(target_has_reliable_f128)]
 
 use std::f128::consts;
 use std::num::FpCategory as Fp;
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 use std::ops::Rem;
 use std::ops::{Add, Div, Mul, Sub};
@@ -23,7 +21,6 @@ const TOL: f128 = 1e-12;
 /// Tolerances for math that is allowed to be imprecise, usually due to multiple chained
 /// operations.
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 const TOL_IMPR: f128 = 1e-10;
 
@@ -76,7 +73,6 @@ fn test_num_f128() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_num_f128_rem() {
     let ten = 10f128;
@@ -86,7 +82,6 @@ fn test_num_f128_rem() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_min_nan() {
     assert_eq!(f128::NAN.min(2.0), 2.0);
@@ -95,7 +90,6 @@ fn test_min_nan() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_max_nan() {
     assert_eq!(f128::NAN.max(2.0), 2.0);
@@ -104,7 +98,6 @@ fn test_max_nan() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_minimum() {
     assert!(f128::NAN.minimum(2.0).is_nan());
@@ -113,7 +106,6 @@ fn test_minimum() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_maximum() {
     assert!(f128::NAN.maximum(2.0).is_nan());
@@ -272,7 +264,6 @@ fn test_classify() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_floor() {
     assert_approx_eq!(1.0f128.floor(), 1.0f128, TOL_PRECISE);
@@ -289,7 +280,6 @@ fn test_floor() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_ceil() {
     assert_approx_eq!(1.0f128.ceil(), 1.0f128, TOL_PRECISE);
@@ -306,7 +296,6 @@ fn test_ceil() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_round() {
     assert_approx_eq!(2.5f128.round(), 3.0f128, TOL_PRECISE);
@@ -324,7 +313,6 @@ fn test_round() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_round_ties_even() {
     assert_approx_eq!(2.5f128.round_ties_even(), 2.0f128, TOL_PRECISE);
@@ -342,7 +330,6 @@ fn test_round_ties_even() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_trunc() {
     assert_approx_eq!(1.0f128.trunc(), 1.0f128, TOL_PRECISE);
@@ -359,7 +346,6 @@ fn test_trunc() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_fract() {
     assert_approx_eq!(1.0f128.fract(), 0.0f128, TOL_PRECISE);
@@ -376,7 +362,6 @@ fn test_fract() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_abs() {
     assert_eq!(f128::INFINITY.abs(), f128::INFINITY);
@@ -478,7 +463,6 @@ fn test_next_down() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_mul_add() {
     let nan: f128 = f128::NAN;
@@ -497,7 +481,6 @@ fn test_mul_add() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_recip() {
     let nan: f128 = f128::NAN;
@@ -521,7 +504,6 @@ fn test_recip() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_powi() {
     let nan: f128 = f128::NAN;
@@ -538,7 +520,6 @@ fn test_powi() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_powf() {
     let nan: f128 = f128::NAN;
@@ -557,7 +538,6 @@ fn test_powf() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_sqrt_domain() {
     assert!(f128::NAN.sqrt().is_nan());
@@ -571,7 +551,6 @@ fn test_sqrt_domain() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_exp() {
     assert_eq!(1.0, 0.0f128.exp());
@@ -588,7 +567,6 @@ fn test_exp() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_exp2() {
     assert_eq!(32.0, 5.0f128.exp2());
@@ -604,7 +582,6 @@ fn test_exp2() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_ln() {
     let nan: f128 = f128::NAN;
@@ -622,7 +599,6 @@ fn test_ln() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_log() {
     let nan: f128 = f128::NAN;
@@ -643,7 +619,6 @@ fn test_log() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_log2() {
     let nan: f128 = f128::NAN;
@@ -662,7 +637,6 @@ fn test_log2() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_log10() {
     let nan: f128 = f128::NAN;
@@ -714,7 +688,6 @@ fn test_to_radians() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_asinh() {
     // Lower accuracy results are allowed, use increased tolerances
@@ -747,7 +720,6 @@ fn test_asinh() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_acosh() {
     assert_eq!(1.0f128.acosh(), 0.0f128);
@@ -768,7 +740,6 @@ fn test_acosh() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_atanh() {
     assert_eq!(0.0f128.atanh(), 0.0f128);
@@ -790,7 +761,6 @@ fn test_atanh() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_gamma() {
     // precision can differ among platforms
@@ -813,7 +783,6 @@ fn test_gamma() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f128_math)]
 fn test_ln_gamma() {
     assert_approx_eq!(1.0f128.ln_gamma().0, 0.0f128, TOL_IMPR);
@@ -846,7 +815,6 @@ fn test_real_consts() {
     assert_approx_eq!(frac_2_pi, 2f128 / pi, TOL_PRECISE);
 
     #[cfg(not(miri))]
-    #[cfg(not(bootstrap))]
     #[cfg(target_has_reliable_f128_math)]
     {
         let frac_2_sqrtpi: f128 = consts::FRAC_2_SQRT_PI;
diff --git a/library/std/tests/floats/f16.rs b/library/std/tests/floats/f16.rs
index 8b3b344dd46..70bbcd07160 100644
--- a/library/std/tests/floats/f16.rs
+++ b/library/std/tests/floats/f16.rs
@@ -1,5 +1,4 @@
 // FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
-#![cfg(not(bootstrap))]
 #![cfg(target_has_reliable_f16)]
 
 use std::f16::consts;
@@ -63,7 +62,6 @@ fn test_num_f16() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_min_nan() {
     assert_eq!(f16::NAN.min(2.0), 2.0);
@@ -72,7 +70,6 @@ fn test_min_nan() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_max_nan() {
     assert_eq!(f16::NAN.max(2.0), 2.0);
@@ -81,7 +78,6 @@ fn test_max_nan() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_minimum() {
     assert!(f16::NAN.minimum(2.0).is_nan());
@@ -90,7 +86,6 @@ fn test_minimum() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_maximum() {
     assert!(f16::NAN.maximum(2.0).is_nan());
@@ -249,7 +244,6 @@ fn test_classify() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_floor() {
     assert_approx_eq!(1.0f16.floor(), 1.0f16, TOL_0);
@@ -266,7 +260,6 @@ fn test_floor() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_ceil() {
     assert_approx_eq!(1.0f16.ceil(), 1.0f16, TOL_0);
@@ -283,7 +276,6 @@ fn test_ceil() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_round() {
     assert_approx_eq!(2.5f16.round(), 3.0f16, TOL_0);
@@ -301,7 +293,6 @@ fn test_round() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_round_ties_even() {
     assert_approx_eq!(2.5f16.round_ties_even(), 2.0f16, TOL_0);
@@ -319,7 +310,6 @@ fn test_round_ties_even() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_trunc() {
     assert_approx_eq!(1.0f16.trunc(), 1.0f16, TOL_0);
@@ -336,7 +326,6 @@ fn test_trunc() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_fract() {
     assert_approx_eq!(1.0f16.fract(), 0.0f16, TOL_0);
@@ -353,7 +342,6 @@ fn test_fract() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_abs() {
     assert_eq!(f16::INFINITY.abs(), f16::INFINITY);
@@ -455,7 +443,6 @@ fn test_next_down() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_mul_add() {
     let nan: f16 = f16::NAN;
@@ -474,7 +461,6 @@ fn test_mul_add() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_recip() {
     let nan: f16 = f16::NAN;
@@ -492,7 +478,6 @@ fn test_recip() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_powi() {
     let nan: f16 = f16::NAN;
@@ -509,7 +494,6 @@ fn test_powi() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_powf() {
     let nan: f16 = f16::NAN;
@@ -528,7 +512,6 @@ fn test_powf() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_sqrt_domain() {
     assert!(f16::NAN.sqrt().is_nan());
@@ -542,7 +525,6 @@ fn test_sqrt_domain() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_exp() {
     assert_eq!(1.0, 0.0f16.exp());
@@ -559,7 +541,6 @@ fn test_exp() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_exp2() {
     assert_eq!(32.0, 5.0f16.exp2());
@@ -575,7 +556,6 @@ fn test_exp2() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_ln() {
     let nan: f16 = f16::NAN;
@@ -593,7 +573,6 @@ fn test_ln() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_log() {
     let nan: f16 = f16::NAN;
@@ -614,7 +593,6 @@ fn test_log() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_log2() {
     let nan: f16 = f16::NAN;
@@ -633,7 +611,6 @@ fn test_log2() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_log10() {
     let nan: f16 = f16::NAN;
@@ -683,7 +660,6 @@ fn test_to_radians() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_asinh() {
     assert_eq!(0.0f16.asinh(), 0.0f16);
@@ -710,7 +686,6 @@ fn test_asinh() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_acosh() {
     assert_eq!(1.0f16.acosh(), 0.0f16);
@@ -731,7 +706,6 @@ fn test_acosh() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_atanh() {
     assert_eq!(0.0f16.atanh(), 0.0f16);
@@ -753,7 +727,6 @@ fn test_atanh() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_gamma() {
     // precision can differ among platforms
@@ -776,7 +749,6 @@ fn test_gamma() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_ln_gamma() {
     assert_approx_eq!(1.0f16.ln_gamma().0, 0.0f16, TOL_0);
@@ -811,7 +783,6 @@ fn test_real_consts() {
     assert_approx_eq!(frac_2_pi, 2f16 / pi, TOL_0);
 
     #[cfg(not(miri))]
-    #[cfg(not(bootstrap))]
     #[cfg(target_has_reliable_f16_math)]
     {
         let frac_2_sqrtpi: f16 = consts::FRAC_2_SQRT_PI;
@@ -874,7 +845,6 @@ fn test_clamp_max_is_nan() {
 
 #[test]
 #[cfg(not(miri))]
-#[cfg(not(bootstrap))]
 #[cfg(target_has_reliable_f16_math)]
 fn test_total_cmp() {
     use core::cmp::Ordering;
diff --git a/library/std/tests/floats/lib.rs b/library/std/tests/floats/lib.rs
index 7884fc9239e..453a2d533ab 100644
--- a/library/std/tests/floats/lib.rs
+++ b/library/std/tests/floats/lib.rs
@@ -1,6 +1,6 @@
 #![feature(f16, f128, float_algebraic, float_gamma, float_minimum_maximum)]
-#![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
-#![cfg_attr(not(bootstrap), expect(internal_features))] // for reliable_f16_f128
+#![feature(cfg_target_has_reliable_f16_f128)]
+#![expect(internal_features)] // for reliable_f16_f128
 
 use std::fmt;
 use std::ops::{Add, Div, Mul, Rem, Sub};