]> git.lizzy.rs Git - rust.git/commitdiff
s/alloc_type/alloc_kind/
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 4 Dec 2018 08:39:09 +0000 (09:39 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 4 Dec 2018 08:39:09 +0000 (09:39 +0100)
src/librustc/mir/interpret/mod.rs
src/librustc_codegen_llvm/common.rs
src/librustc_mir/monomorphize/collector.rs

index fbfe0cdae6beda21690583e1f884fb003350d5d2..9708f7c6717f42e7c8c69dd00532f7bfee0c5ad1 100644 (file)
@@ -103,9 +103,9 @@ pub fn specialized_encode_alloc_id<
     tcx: TyCtxt<'a, 'tcx, 'tcx>,
     alloc_id: AllocId,
 ) -> Result<(), E::Error> {
-    let alloc_type: AllocKind<'tcx> =
+    let alloc_kind: AllocKind<'tcx> =
         tcx.alloc_map.lock().get(alloc_id).expect("no value for AllocId");
-    match alloc_type {
+    match alloc_kind {
         AllocKind::Memory(alloc) => {
             trace!("encoding {:?} with {:#?}", alloc_id, alloc);
             AllocDiscriminant::Alloc.encode(encoder)?;
@@ -339,14 +339,14 @@ pub fn reserve(
         next
     }
 
-    fn intern(&mut self, alloc_type: AllocKind<'tcx>) -> AllocId {
-        if let Some(&alloc_id) = self.type_interner.get(&alloc_type) {
+    fn intern(&mut self, alloc_kind: AllocKind<'tcx>) -> AllocId {
+        if let Some(&alloc_id) = self.type_interner.get(&alloc_kind) {
             return alloc_id;
         }
         let id = self.reserve();
-        debug!("creating alloc_type {:?} with id {}", alloc_type, id);
-        self.id_to_type.insert(id, alloc_type.clone());
-        self.type_interner.insert(alloc_type, id);
+        debug!("creating alloc_kind {:?} with id {}", alloc_kind, id);
+        self.id_to_type.insert(id, alloc_kind.clone());
+        self.type_interner.insert(alloc_kind, id);
         id
     }
 
index 0d9c417f5229ba3164f3d83b5b397666b43204c2..194b6b4e2706d109c5e31d021960324ca3e1654a 100644 (file)
@@ -316,8 +316,8 @@ fn scalar_to_backend(
                 }
             },
             Scalar::Ptr(ptr) => {
-                let alloc_type = self.tcx.alloc_map.lock().get(ptr.alloc_id);
-                let base_addr = match alloc_type {
+                let alloc_kind = self.tcx.alloc_map.lock().get(ptr.alloc_id);
+                let base_addr = match alloc_kind {
                     Some(AllocKind::Memory(alloc)) => {
                         let init = const_alloc_to_llvm(self, alloc);
                         if alloc.mutability == Mutability::Mutable {
index ec5c57ee0ba68d435e5796996f4d3c4e5160ac88..289402d3b46a150e519ae7bac8eee07b20967668 100644 (file)
@@ -1161,8 +1161,8 @@ fn collect_miri<'a, 'tcx>(
     alloc_id: AllocId,
     output: &mut Vec<MonoItem<'tcx>>,
 ) {
-    let alloc_type = tcx.alloc_map.lock().get(alloc_id);
-    match alloc_type {
+    let alloc_kind = tcx.alloc_map.lock().get(alloc_id);
+    match alloc_kind {
         Some(AllocKind::Static(did)) => {
             let instance = Instance::mono(tcx, did);
             if should_monomorphize_locally(tcx, &instance) {