1
Fork 0

make it more clear which functions create fresh AllocId

This commit is contained in:
Ralf Jung 2023-09-12 08:42:36 +02:00
parent 0f8908da27
commit 430c386821
18 changed files with 45 additions and 45 deletions

View file

@ -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>) {