Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d3dbf35

Browse files
committed
Rustup to rustc 1.37.0-nightly (03ee55b 2019-06-01)
1 parent 37708ad commit d3dbf35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/constant.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::borrow::Cow;
22

33
use rustc::mir::interpret::{
4-
read_target_uint, AllocId, AllocKind, Allocation, ConstValue, EvalResult, GlobalId, Scalar,
4+
read_target_uint, AllocId, GlobalAlloc, Allocation, ConstValue, EvalResult, GlobalId, Scalar,
55
};
66
use rustc::ty::Const;
77
use rustc_mir::interpret::{
@@ -171,7 +171,7 @@ fn trans_const_place<'a, 'tcx: 'a>(
171171
let alloc = result().expect("unable to convert ConstValue to Allocation");
172172

173173
//println!("const value: {:?} allocation: {:?}", value, alloc);
174-
let alloc_id = fx.tcx.alloc_map.lock().allocate(alloc);
174+
let alloc_id = fx.tcx.alloc_map.lock().create_memory_alloc(alloc);
175175
fx.constants.todo.insert(TodoItem::Alloc(alloc_id));
176176
let data_id = data_id_for_alloc_id(fx.module, alloc_id);
177177
cplace_for_dataid(fx, const_.ty, data_id)
@@ -296,18 +296,18 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
296296
};
297297

298298
let data_id = match tcx.alloc_map.lock().get(reloc).unwrap() {
299-
AllocKind::Function(instance) => {
299+
GlobalAlloc::Function(instance) => {
300300
assert_eq!(addend, 0);
301301
let func_id = crate::abi::import_function(tcx, module, instance);
302302
let local_func_id = module.declare_func_in_data(func_id, &mut data_ctx);
303303
data_ctx.write_function_addr(offset.bytes() as u32, local_func_id);
304304
continue;
305305
}
306-
AllocKind::Memory(_) => {
306+
GlobalAlloc::Memory(_) => {
307307
cx.todo.insert(TodoItem::Alloc(reloc));
308308
data_id_for_alloc_id(module, reloc)
309309
}
310-
AllocKind::Static(def_id) => {
310+
GlobalAlloc::Static(def_id) => {
311311
cx.todo.insert(TodoItem::Static(def_id));
312312
let linkage = crate::linkage::get_static_ref_linkage(tcx, def_id);
313313
data_id_for_static(tcx, module, def_id, linkage)

0 commit comments

Comments
 (0)