We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 432d9e5 commit 998b3b7Copy full SHA for 998b3b7
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
// Whether we encountered a bad mutable pointer.
0 commit comments