]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/relate.rs
Nuke the entire ctfe from orbit, it's the only way to be sure
[rust.git] / src / librustc / ty / relate.rs
index bac78508993a5c1dca48b8d8c8b99df9d19dbe51..2cbe9da88b51b392123f898798573ee4d1802b00 100644 (file)
@@ -483,7 +483,6 @@ pub fn super_relate_tys<'a, 'gcx, 'tcx, R>(relation: &mut R,
             assert_eq!(sz_b.ty, tcx.types.usize);
             let to_u64 = |x: &'tcx ty::Const<'tcx>| -> Result<u64, ErrorReported> {
                 match x.val {
-                    ConstVal::Integral(x) => Ok(x.to_u64().unwrap()),
                     ConstVal::Value(Value::ByVal(prim)) => Ok(prim.to_u64().unwrap()),
                     ConstVal::Unevaluated(def_id, substs) => {
                         // FIXME(eddyb) get the right param_env.
@@ -491,9 +490,6 @@ pub fn super_relate_tys<'a, 'gcx, 'tcx, R>(relation: &mut R,
                         match tcx.lift_to_global(&substs) {
                             Some(substs) => {
                                 match tcx.const_eval(param_env.and((def_id, substs))) {
-                                    Ok(&ty::Const { val: ConstVal::Integral(x), .. }) => {
-                                        return Ok(x.to_u64().unwrap());
-                                    }
                                     Ok(&ty::Const {
                                         val: ConstVal::Value(Value::ByVal(PrimVal::Bytes(b))),
                                         ..