clippy
This commit is contained in:
parent
9d579f5358
commit
543d226589
@ -301,6 +301,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
|
|||||||
let b = this.read_scalar(b)?.to_f32()?;
|
let b = this.read_scalar(b)?.to_f32()?;
|
||||||
let c = this.read_scalar(c)?.to_f32()?;
|
let c = this.read_scalar(c)?.to_f32()?;
|
||||||
let fuse: bool = this.machine.rng.get_mut().gen();
|
let fuse: bool = this.machine.rng.get_mut().gen();
|
||||||
|
#[allow(clippy::arithmetic_side_effects)] // float ops don't overflow
|
||||||
let res = if fuse {
|
let res = if fuse {
|
||||||
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
|
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
|
||||||
a.to_host().mul_add(b.to_host(), c.to_host()).to_soft()
|
a.to_host().mul_add(b.to_host(), c.to_host()).to_soft()
|
||||||
@ -316,6 +317,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
|
|||||||
let b = this.read_scalar(b)?.to_f64()?;
|
let b = this.read_scalar(b)?.to_f64()?;
|
||||||
let c = this.read_scalar(c)?.to_f64()?;
|
let c = this.read_scalar(c)?.to_f64()?;
|
||||||
let fuse: bool = this.machine.rng.get_mut().gen();
|
let fuse: bool = this.machine.rng.get_mut().gen();
|
||||||
|
#[allow(clippy::arithmetic_side_effects)] // float ops don't overflow
|
||||||
let res = if fuse {
|
let res = if fuse {
|
||||||
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
|
// FIXME: Using host floats, to work around https://github.com/rust-lang/rustc_apfloat/issues/11
|
||||||
a.to_host().mul_add(b.to_host(), c.to_host()).to_soft()
|
a.to_host().mul_add(b.to_host(), c.to_host()).to_soft()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user