]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trans/context.rs
Rollup merge of #44562 - eddyb:ugh-rustdoc, r=nikomatsakis
[rust.git] / src / librustc_trans / context.rs
index a5830eb17edb14c95e007c7cd06361ec3e3c6c88..4211be362ef19e0a0bcd7d96326701e11ef31160 100644 (file)
@@ -104,7 +104,7 @@ pub struct LocalCrateContext<'a, 'tcx: 'a> {
     /// Cache instances of monomorphic and polymorphic items
     instances: RefCell<FxHashMap<Instance<'tcx>, ValueRef>>,
     /// Cache generated vtables
-    vtables: RefCell<FxHashMap<(ty::Ty<'tcx>,
+    vtables: RefCell<FxHashMap<(Ty<'tcx>,
                                 Option<ty::PolyExistentialTraitRef<'tcx>>), ValueRef>>,
     /// Cache of constant strings,
     const_cstr_cache: RefCell<FxHashMap<InternedString, ValueRef>>,
@@ -136,7 +136,7 @@ pub struct LocalCrateContext<'a, 'tcx: 'a> {
     used_statics: RefCell<Vec<ValueRef>>,
 
     lltypes: RefCell<FxHashMap<Ty<'tcx>, Type>>,
-    int_type: Type,
+    isize_ty: Type,
     opaque_vec_type: Type,
     str_slice_type: Type,
 
@@ -398,7 +398,7 @@ pub fn new(shared: &SharedCrateContext<'a, 'tcx>,
                 statics_to_rauw: RefCell::new(Vec::new()),
                 used_statics: RefCell::new(Vec::new()),
                 lltypes: RefCell::new(FxHashMap()),
-                int_type: Type::from_ref(ptr::null_mut()),
+                isize_ty: Type::from_ref(ptr::null_mut()),
                 opaque_vec_type: Type::from_ref(ptr::null_mut()),
                 str_slice_type: Type::from_ref(ptr::null_mut()),
                 dbg_cx,
@@ -410,23 +410,23 @@ pub fn new(shared: &SharedCrateContext<'a, 'tcx>,
                 placeholder: PhantomData,
             };
 
-            let (int_type, opaque_vec_type, str_slice_ty, mut local_ccx) = {
+            let (isize_ty, opaque_vec_type, str_slice_ty, mut local_ccx) = {
                 // Do a little dance to create a dummy CrateContext, so we can
                 // create some things in the LLVM module of this codegen unit
                 let mut local_ccxs = vec![local_ccx];
-                let (int_type, opaque_vec_type, str_slice_ty) = {
+                let (isize_ty, opaque_vec_type, str_slice_ty) = {
                     let dummy_ccx = LocalCrateContext::dummy_ccx(shared,
                                                                  local_ccxs.as_mut_slice());
                     let mut str_slice_ty = Type::named_struct(&dummy_ccx, "str_slice");
                     str_slice_ty.set_struct_body(&[Type::i8p(&dummy_ccx),
-                                                   Type::int(&dummy_ccx)],
+                                                   Type::isize(&dummy_ccx)],
                                                  false);
-                    (Type::int(&dummy_ccx), Type::opaque_vec(&dummy_ccx), str_slice_ty)
+                    (Type::isize(&dummy_ccx), Type::opaque_vec(&dummy_ccx), str_slice_ty)
                 };
-                (int_type, opaque_vec_type, str_slice_ty, local_ccxs.pop().unwrap())
+                (isize_ty, opaque_vec_type, str_slice_ty, local_ccxs.pop().unwrap())
             };
 
-            local_ccx.int_type = int_type;
+            local_ccx.isize_ty = isize_ty;
             local_ccx.opaque_vec_type = opaque_vec_type;
             local_ccx.str_slice_type = str_slice_ty;
 
@@ -512,7 +512,7 @@ pub fn instances<'a>(&'a self) -> &'a RefCell<FxHashMap<Instance<'tcx>, ValueRef
     }
 
     pub fn vtables<'a>(&'a self)
-        -> &'a RefCell<FxHashMap<(ty::Ty<'tcx>,
+        -> &'a RefCell<FxHashMap<(Ty<'tcx>,
                                   Option<ty::PolyExistentialTraitRef<'tcx>>), ValueRef>> {
         &self.local().vtables
     }
@@ -549,8 +549,8 @@ pub fn stats<'a>(&'a self) -> &'a Stats {
         &self.local().stats
     }
 
-    pub fn int_type(&self) -> Type {
-        self.local().int_type
+    pub fn isize_ty(&self) -> Type {
+        self.local().isize_ty
     }
 
     pub fn str_slice_type(&self) -> Type {