]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trans/glue.rs
move projection mode into parameter environment
[rust.git] / src / librustc_trans / glue.rs
index 59876a7f2a201da688fe23eda5f397852fd9ceb0..f473d957a9031243372524e2e737cce1fb144103 100644 (file)
@@ -46,7 +46,7 @@ pub fn needs_drop_glue<'a, 'tcx>(scx: &SharedCrateContext<'a, 'tcx>, t: Ty<'tcx>
         ty::TyAdt(def, _) if def.is_box() => {
             let typ = t.boxed_ty();
             if !scx.type_needs_drop(typ) && scx.type_is_sized(typ) {
-                scx.tcx().infer_ctxt((), traits::Reveal::All).enter(|infcx| {
+                scx.tcx().infer_ctxt(traits::Reveal::All).enter(|infcx| {
                     let layout = t.layout(&infcx).unwrap();
                     if layout.size(scx).bytes() == 0 {
                         // `Box<ZeroSizeType>` does not allocate.
@@ -76,6 +76,7 @@ pub fn size_and_align_of_dst<'a, 'tcx>(bcx: &Builder<'a, 'tcx>, t: Ty<'tcx>, inf
         let align = C_uint(bcx.ccx, align);
         return (size, align);
     }
+    assert!(!info.is_null());
     match t.sty {
         ty::TyAdt(def, substs) => {
             let ccx = bcx.ccx;