Skip to content

Commit 14e3506

Browse files
committed
note a FIXME
1 parent b1d4d2b commit 14e3506

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_mir/interpret/intern.rs

+2
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ pub fn intern_const_alloc_recursive(
331331
if base_intern_mode != InternMode::Static {
332332
// If it's not a static, it *must* be immutable.
333333
// 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.
334336
alloc.mutability = Mutability::Immutable;
335337
}
336338
let alloc = tcx.intern_const_alloc(alloc);

0 commit comments

Comments
 (0)