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
|
@ -114,7 +114,7 @@ impl EnumSizeOpt {
|
|||
tcx.data_layout.ptr_sized_integer().align(&tcx.data_layout).abi,
|
||||
Mutability::Not,
|
||||
);
|
||||
let alloc = tcx.create_memory_alloc(tcx.mk_const_alloc(alloc));
|
||||
let alloc = tcx.reserve_and_set_memory_alloc(tcx.mk_const_alloc(alloc));
|
||||
Some((*adt_def, num_discrs, *alloc_cache.entry(ty).or_insert(alloc)))
|
||||
}
|
||||
fn optim<'tcx>(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue