Skip to content

Commit d625019

Browse files
committed
s/alloc_type/alloc_kind/
1 parent 2e00d64 commit d625019

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/librustc/mir/interpret/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ pub fn specialized_encode_alloc_id<
103103
tcx: TyCtxt<'a, 'tcx, 'tcx>,
104104
alloc_id: AllocId,
105105
) -> Result<(), E::Error> {
106-
let alloc_type: AllocKind<'tcx> =
106+
let alloc_kind: AllocKind<'tcx> =
107107
tcx.alloc_map.lock().get(alloc_id).expect("no value for AllocId");
108-
match alloc_type {
108+
match alloc_kind {
109109
AllocKind::Memory(alloc) => {
110110
trace!("encoding {:?} with {:#?}", alloc_id, alloc);
111111
AllocDiscriminant::Alloc.encode(encoder)?;
@@ -339,14 +339,14 @@ impl<'tcx> AllocMap<'tcx> {
339339
next
340340
}
341341

342-
fn intern(&mut self, alloc_type: AllocKind<'tcx>) -> AllocId {
343-
if let Some(&alloc_id) = self.type_interner.get(&alloc_type) {
342+
fn intern(&mut self, alloc_kind: AllocKind<'tcx>) -> AllocId {
343+
if let Some(&alloc_id) = self.type_interner.get(&alloc_kind) {
344344
return alloc_id;
345345
}
346346
let id = self.reserve();
347-
debug!("creating alloc_type {:?} with id {}", alloc_type, id);
348-
self.id_to_type.insert(id, alloc_type.clone());
349-
self.type_interner.insert(alloc_type, id);
347+
debug!("creating alloc_kind {:?} with id {}", alloc_kind, id);
348+
self.id_to_type.insert(id, alloc_kind.clone());
349+
self.type_interner.insert(alloc_kind, id);
350350
id
351351
}
352352

src/librustc_codegen_llvm/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
316316
}
317317
},
318318
Scalar::Ptr(ptr) => {
319-
let alloc_type = self.tcx.alloc_map.lock().get(ptr.alloc_id);
320-
let base_addr = match alloc_type {
319+
let alloc_kind = self.tcx.alloc_map.lock().get(ptr.alloc_id);
320+
let base_addr = match alloc_kind {
321321
Some(AllocKind::Memory(alloc)) => {
322322
let init = const_alloc_to_llvm(self, alloc);
323323
if alloc.mutability == Mutability::Mutable {

src/librustc_mir/monomorphize/collector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,8 +1161,8 @@ fn collect_miri<'a, 'tcx>(
11611161
alloc_id: AllocId,
11621162
output: &mut Vec<MonoItem<'tcx>>,
11631163
) {
1164-
let alloc_type = tcx.alloc_map.lock().get(alloc_id);
1165-
match alloc_type {
1164+
let alloc_kind = tcx.alloc_map.lock().get(alloc_id);
1165+
match alloc_kind {
11661166
Some(AllocKind::Static(did)) => {
11671167
let instance = Instance::mono(tcx, did);
11681168
if should_monomorphize_locally(tcx, &instance) {

0 commit comments

Comments
 (0)