De-duplicate and move adjust_nan to InterpCx

This commit is contained in:
Eduardo Sánchez Muñoz 2024-10-14 20:58:32 +02:00
parent 8f8bee4f60
commit b73e613e00
4 changed files with 19 additions and 23 deletions

View file

@ -115,8 +115,4 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
nan
}
}
fn adjust_nan<F1: Float + FloatConvert<F2>, F2: Float>(&self, f: F2, inputs: &[F1]) -> F2 {
if f.is_nan() { self.generate_nan(inputs) } else { f }
}
}