]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/hair/constant.rs
Remove unnecessary lift calls
[rust.git] / src / librustc_mir / hair / constant.rs
index 2cd04631118d1a023f318f137a0aeea254eb4791..bc01e3ee95b978871b92e9a878bee65bf62ba707 100644 (file)
@@ -18,7 +18,7 @@
     use syntax::ast::*;
 
     let trunc = |n| {
-        let param_ty = ParamEnv::reveal_all().and(tcx.lift_to_global(&ty).unwrap());
+        let param_ty = ParamEnv::reveal_all().and(ty);
         let width = tcx.layout_of(param_ty).map_err(|_| LitToConstError::Reported)?.size;
         trace!("trunc {} with size {} and shift {}", n, width.bits(), 128 - width.bits());
         let result = truncate(n, width);