Skip to content

Commit 543d226

Browse files
committed
clippy
1 parent 9d579f5 commit 543d226

File tree

1 file changed

+2
-0
lines changed
  • src/tools/miri/src/intrinsics

1 file changed

+2
-0
lines changed

src/tools/miri/src/intrinsics/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
301301
let b = this.read_scalar(b)?.to_f32()?;
302302
let c = this.read_scalar(c)?.to_f32()?;
303303
let fuse: bool = this.machine.rng.get_mut().gen();
304+
#[allow(clippy::arithmetic_side_effects)] // float ops don't overflow
304305
let res = if fuse {
305306
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
306307
a.to_host().mul_add(b.to_host(), c.to_host()).to_soft()
@@ -316,6 +317,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
316317
let b = this.read_scalar(b)?.to_f64()?;
317318
let c = this.read_scalar(c)?.to_f64()?;
318319
let fuse: bool = this.machine.rng.get_mut().gen();
320+
#[allow(clippy::arithmetic_side_effects)] // float ops don't overflow
319321
let res = if fuse {
320322
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
321323
a.to_host().mul_add(b.to_host(), c.to_host()).to_soft()

0 commit comments

Comments
 (0)