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

Commit 35de5bb

Browse files
committed
fmt
1 parent 461d19b commit 35de5bb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/tools/miri/src/machine.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,10 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
10021002
}
10031003

10041004
#[inline(always)]
1005-
fn generate_nan<F1: rustc_apfloat::Float + rustc_apfloat::FloatConvert<F2>, F2: rustc_apfloat::Float>(
1005+
fn generate_nan<
1006+
F1: rustc_apfloat::Float + rustc_apfloat::FloatConvert<F2>,
1007+
F2: rustc_apfloat::Float,
1008+
>(
10061009
ecx: &InterpCx<'mir, 'tcx, Self>,
10071010
inputs: &[F1],
10081011
) -> F2 {

src/tools/miri/tests/pass/float_nan.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,7 @@ fn test_casts() {
345345
);
346346
// Check that the low bits are gone (not the high bits).
347347
check_all_outcomes(
348-
HashSet::from_iter([
349-
F32::nan(Pos, Quiet, 0),
350-
F32::nan(Neg, Quiet, 0),
351-
]),
348+
HashSet::from_iter([F32::nan(Pos, Quiet, 0), F32::nan(Neg, Quiet, 0)]),
352349
|| F32::from(F64::nan(Pos, Quiet, 1).as_f64() as f32),
353350
);
354351
check_all_outcomes(
@@ -358,7 +355,7 @@ fn test_casts() {
358355
F32::nan(Pos, Quiet, 1),
359356
F32::nan(Neg, Quiet, 1),
360357
]),
361-
|| F32::from(F64::nan(Pos, Quiet, 1 << (51-22)).as_f64() as f32),
358+
|| F32::from(F64::nan(Pos, Quiet, 1 << (51 - 22)).as_f64() as f32),
362359
);
363360
check_all_outcomes(
364361
HashSet::from_iter([

0 commit comments

Comments
 (0)