Skip to content

Commit a39fb7d

Browse files
committed
Auto merge of #152035 - Zalathar:rollup-Ur7QmrJ, r=Zalathar
Rollup of 7 pull requests Successful merges: - rust-lang/rust#152008 (`rust-analyzer` subtree update) - rust-lang/rust#151109 (fN::BITS constants for feature float_bits_const) - rust-lang/rust#151976 (Rename `collect_active_jobs` to several distinct names) - rust-lang/rust#151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`) - rust-lang/rust#151919 (fix: Make `--color always` always print color with `--explain`) - rust-lang/rust#152017 (Remove `with_no_trimmed_paths` use in query macro) - rust-lang/rust#152028 (Convert to inline diagnostics in `rustc_driver_impl`)
2 parents b72d73f + 7058df3 commit a39fb7d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/pass/float.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ macro_rules! test_ftoi_itof {
353353
assert_itof(i, f, msg);
354354
}
355355

356-
let fbits = <$fty>::BITS;
356+
let fbits = <$fty as Float>::BITS;
357357
let fsig_bits = <$fty>::SIGNIFICAND_BITS;
358358
let ibits = <$ity>::BITS;
359359
let imax: $ity = <$ity>::MAX;
@@ -528,9 +528,9 @@ macro_rules! test_ftof {
528528
assert!((<$f1>::NAN as $f2).is_nan(), "{} -> {} nan", stringify!($f1), stringify!($f2));
529529

530530
let min_sub_casted = <$f1>::from_bits(0x1) as $f2;
531-
let min_neg_sub_casted = <$f1>::from_bits(0x1 | 1 << (<$f1>::BITS - 1)) as $f2;
531+
let min_neg_sub_casted = <$f1>::from_bits(0x1 | 1 << (<$f1 as Float>::BITS - 1)) as $f2;
532532

533-
if <$f1>::BITS > <$f2>::BITS {
533+
if <$f1 as Float>::BITS > <$f2 as Float>::BITS {
534534
assert_feq(<$f1>::MAX as $f2, <$f2>::INFINITY, "max -> inf");
535535
assert_feq(<$f1>::MIN as $f2, <$f2>::NEG_INFINITY, "max -> inf");
536536
assert_biteq(min_sub_casted, f2zero, "min subnormal -> 0.0");

0 commit comments

Comments
 (0)