]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/layout.rs
Merge branch 'refactor-select' of https://github.com/aravind-pg/rust into update...
[rust.git] / src / librustc / ty / layout.rs
index 63b91ff110161f6c7d375071a14bf6be8c0d55c9..5069c59562678a722926951c82222e89aa2b102c 100644 (file)
@@ -1203,7 +1203,7 @@ enum StructKind {
                 }
 
                 let pointee = tcx.normalize_associated_type_in_env(&pointee, param_env);
-                if pointee.is_sized(tcx, param_env, DUMMY_SP) {
+                if pointee.is_sized(tcx.at(DUMMY_SP), param_env) {
                     return Ok(tcx.intern_layout(LayoutDetails::scalar(self, data_ptr)));
                 }
 
@@ -1428,7 +1428,7 @@ enum StructKind {
                         let param_env = tcx.param_env(def.did);
                         let last_field = def.variants[v].fields.last().unwrap();
                         let always_sized = tcx.type_of(last_field.did)
-                          .is_sized(tcx, param_env, DUMMY_SP);
+                          .is_sized(tcx.at(DUMMY_SP), param_env);
                         if !always_sized { StructKind::MaybeUnsized }
                         else { StructKind::AlwaysSized }
                     };
@@ -2059,7 +2059,7 @@ fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout {
         // can however trigger recursive invocations of `layout_of`.
         // Therefore, we execute it *after* the main query has
         // completed, to avoid problems around recursive structures
-        // and the like. (Admitedly, I wasn't able to reproduce a problem
+        // and the like. (Admittedly, I wasn't able to reproduce a problem
         // here, but it seems like the right thing to do. -nmatsakis)
         self.record_layout_for_printing(layout);
 
@@ -2085,7 +2085,7 @@ fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout {
         // can however trigger recursive invocations of `layout_of`.
         // Therefore, we execute it *after* the main query has
         // completed, to avoid problems around recursive structures
-        // and the like. (Admitedly, I wasn't able to reproduce a problem
+        // and the like. (Admittedly, I wasn't able to reproduce a problem
         // here, but it seems like the right thing to do. -nmatsakis)
         let cx = LayoutCx {
             tcx: *self.tcx,