File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/tools/miri/src/intrinsics Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
301
301
let b = this. read_scalar ( b) ?. to_f32 ( ) ?;
302
302
let c = this. read_scalar ( c) ?. to_f32 ( ) ?;
303
303
let fuse: bool = this. machine . rng . get_mut ( ) . gen ( ) ;
304
+ #[ allow( clippy:: arithmetic_side_effects) ] // float ops don't overflow
304
305
let res = if fuse {
305
306
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
306
307
a. to_host ( ) . mul_add ( b. to_host ( ) , c. to_host ( ) ) . to_soft ( )
@@ -316,6 +317,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
316
317
let b = this. read_scalar ( b) ?. to_f64 ( ) ?;
317
318
let c = this. read_scalar ( c) ?. to_f64 ( ) ?;
318
319
let fuse: bool = this. machine . rng . get_mut ( ) . gen ( ) ;
320
+ #[ allow( clippy:: arithmetic_side_effects) ] // float ops don't overflow
319
321
let res = if fuse {
320
322
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
321
323
a. to_host ( ) . mul_add ( b. to_host ( ) , c. to_host ( ) ) . to_soft ( )
You can’t perform that action at this time.
0 commit comments