make it more clear which functions create fresh AllocId
This commit is contained in:
parent
0f8908da27
commit
430c386821
18 changed files with 45 additions and 45 deletions
|
@ -45,7 +45,7 @@ pub fn new_allocation<'tcx>(
|
|||
new_empty_allocation(align.abi)
|
||||
}
|
||||
ConstValue::Slice { data, start, end } => {
|
||||
let alloc_id = tables.tcx.create_memory_alloc(data);
|
||||
let alloc_id = tables.tcx.reserve_and_set_memory_alloc(data);
|
||||
let ptr = Pointer::new(alloc_id, rustc_target::abi::Size::from_bytes(start));
|
||||
let scalar_ptr = rustc_middle::mir::interpret::Scalar::from_pointer(ptr, &tables.tcx);
|
||||
let scalar_len = rustc_middle::mir::interpret::Scalar::from_target_usize(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue