We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a57a00e commit 5d46b98Copy full SHA for 5d46b98
compiler/rustc_const_eval/src/interpret/intern.rs
@@ -125,6 +125,9 @@ pub fn intern_const_alloc_recursive<
125
126
// Intern the base allocation, and initialize todo list for recursive interning.
127
let base_alloc_id = ret.ptr().provenance.unwrap().alloc_id();
128
+ // First we intern the base allocation, as it requires a different mutability.
129
+ // This gives us the initial set of nested allocations, which will then all be processed
130
+ // recursively in the loop below.
131
let mut todo: Vec<_> =
132
intern_shallow(ecx, base_alloc_id, base_mutability).unwrap().map(|prov| prov).collect();
133
// We need to distinguish "has just been interned" from "was already in `tcx`",
0 commit comments