Merge pull request #289 from RalfJung/rusutp

Update for Rust nightly
This commit is contained in:
Ralf Jung
2017-08-07 12:57:14 -07:00
committed by GitHub
+1 -3
View File
@@ -216,13 +216,11 @@ pub fn str_to_value(&mut self, s: &str) -> EvalResult<'tcx, Value> {
pub(super) fn const_to_value(&mut self, const_val: &ConstVal<'tcx>) -> EvalResult<'tcx, Value> {
use rustc::middle::const_val::ConstVal::*;
use rustc_const_math::ConstFloat;
let primval = match *const_val {
Integral(const_int) => PrimVal::Bytes(const_int.to_u128_unchecked()),
Float(ConstFloat::F32(f)) => PrimVal::from_f32(f),
Float(ConstFloat::F64(f)) => PrimVal::from_f64(f),
Float(val) => PrimVal::Bytes(val.bits),
Bool(b) => PrimVal::from_bool(b),
Char(c) => PrimVal::from_char(c),