1
Fork 0

Rename has_provance and tweaks comments.

This commit is contained in:
Camille GILLOT 2023-10-23 18:27:54 +00:00
parent eda1928baa
commit 72f0e0e795
3 changed files with 24 additions and 12 deletions

View file

@ -474,9 +474,12 @@ pub fn intern_const_alloc_for_constprop<
alloc.mutability = Mutability::Not;
// link the alloc id to the actual allocation
// We are not doing recursive interning, so we don't currently support provenance.
// (If this assertion ever triggers, we should just implement a
// proper recursive interning loop.)
assert!(alloc.provenance().ptrs().is_empty());
// Link the alloc id to the actual allocation
let alloc = ecx.tcx.mk_const_alloc(alloc);
ecx.tcx.set_alloc_id_memory(alloc_id, alloc);