Skip to content

Commit a98a68b

Browse files
authored
Merge pull request rust-lang#289 from RalfJung/rusutp
Update for Rust nightly
2 parents b59c092 + e7d8037 commit a98a68b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_mir/interpret/eval_context.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,11 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
216216

217217
pub(super) fn const_to_value(&mut self, const_val: &ConstVal<'tcx>) -> EvalResult<'tcx, Value> {
218218
use rustc::middle::const_val::ConstVal::*;
219-
use rustc_const_math::ConstFloat;
220219

221220
let primval = match *const_val {
222221
Integral(const_int) => PrimVal::Bytes(const_int.to_u128_unchecked()),
223222

224-
Float(ConstFloat::F32(f)) => PrimVal::from_f32(f),
225-
Float(ConstFloat::F64(f)) => PrimVal::from_f64(f),
223+
Float(val) => PrimVal::Bytes(val.bits),
226224

227225
Bool(b) => PrimVal::from_bool(b),
228226
Char(c) => PrimVal::from_char(c),

0 commit comments

Comments
 (0)