Skip to content

Commit 5462ecb

Browse files
committed
update intern classification comment
1 parent 224e2e5 commit 5462ecb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/interpret/intern.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,10 @@ pub fn intern_const_alloc_recursive(
278278
// this `mutability` is the mutability of the place, ignoring the type
279279
let (base_mutability, base_intern_mode) = match tcx.static_mutability(def_id) {
280280
Some(hir::Mutability::MutImmutable) => (Mutability::Immutable, InternMode::Static),
281-
None => (Mutability::Immutable, InternMode::ConstBase),
282281
// `static mut` doesn't care about interior mutability, it's mutable anyway
283282
Some(hir::Mutability::MutMutable) => (Mutability::Mutable, InternMode::Static),
283+
// consts, promoteds. FIXME: what about array lengths, array initializers?
284+
None => (Mutability::Immutable, InternMode::ConstBase),
284285
};
285286

286287
// Type based interning.

0 commit comments

Comments
 (0)