about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-10-23 18:27:54 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-10-25 17:59:30 +0000
commit72f0e0e79535246c31b0b1e992f9b0ef8a072dc4 (patch)
tree6ba06365752510fda6e63be5327f8b5cc43096a2 /compiler/rustc_const_eval/src
parenteda1928baa868495cd3481358390f8a4e286a659 (diff)
downloadrust-72f0e0e79535246c31b0b1e992f9b0ef8a072dc4.tar.gz
rust-72f0e0e79535246c31b0b1e992f9b0ef8a072dc4.zip
Rename has_provance and tweaks comments.
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/intern.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intern.rs b/compiler/rustc_const_eval/src/interpret/intern.rs
index 23d6d321947..3d90e95c09c 100644
--- a/compiler/rustc_const_eval/src/interpret/intern.rs
+++ b/compiler/rustc_const_eval/src/interpret/intern.rs
@@ -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);