We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1d4d2b commit 14e3506Copy full SHA for 14e3506
src/librustc_mir/interpret/intern.rs
@@ -331,6 +331,8 @@ pub fn intern_const_alloc_recursive(
331
if base_intern_mode != InternMode::Static {
332
// If it's not a static, it *must* be immutable.
333
// We cannot have mutable memory inside a constant.
334
+ // FIXME: ideally we would assert that they already are immutable, to double-
335
+ // check our static checks.
336
alloc.mutability = Mutability::Immutable;
337
}
338
let alloc = tcx.intern_const_alloc(alloc);
0 commit comments