From 35de5bb9d2b1ce2944cacbc8a09f570430e1cf3b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 12 Oct 2023 09:20:17 +0200 Subject: [PATCH] fmt --- src/tools/miri/src/machine.rs | 5 ++++- src/tools/miri/tests/pass/float_nan.rs | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/miri/src/machine.rs b/src/tools/miri/src/machine.rs index 3de27460860..4cb1e7a826b 100644 --- a/src/tools/miri/src/machine.rs +++ b/src/tools/miri/src/machine.rs @@ -1002,7 +1002,10 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> { } #[inline(always)] - fn generate_nan, F2: rustc_apfloat::Float>( + fn generate_nan< + F1: rustc_apfloat::Float + rustc_apfloat::FloatConvert, + F2: rustc_apfloat::Float, + >( ecx: &InterpCx<'mir, 'tcx, Self>, inputs: &[F1], ) -> F2 { diff --git a/src/tools/miri/tests/pass/float_nan.rs b/src/tools/miri/tests/pass/float_nan.rs index 698aa447e26..9b0a40c41b9 100644 --- a/src/tools/miri/tests/pass/float_nan.rs +++ b/src/tools/miri/tests/pass/float_nan.rs @@ -345,10 +345,7 @@ fn test_casts() { ); // Check that the low bits are gone (not the high bits). check_all_outcomes( - HashSet::from_iter([ - F32::nan(Pos, Quiet, 0), - F32::nan(Neg, Quiet, 0), - ]), + HashSet::from_iter([F32::nan(Pos, Quiet, 0), F32::nan(Neg, Quiet, 0)]), || F32::from(F64::nan(Pos, Quiet, 1).as_f64() as f32), ); check_all_outcomes( @@ -358,7 +355,7 @@ fn test_casts() { F32::nan(Pos, Quiet, 1), F32::nan(Neg, Quiet, 1), ]), - || F32::from(F64::nan(Pos, Quiet, 1 << (51-22)).as_f64() as f32), + || F32::from(F64::nan(Pos, Quiet, 1 << (51 - 22)).as_f64() as f32), ); check_all_outcomes( HashSet::from_iter([