Skip to content
Permalink
Browse files

update intern classification comment

  • Loading branch information...
RalfJung committed Aug 28, 2019
1 parent 224e2e5 commit 5462ecb4b131a513b2d821d52b9af491781bd898
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/librustc_mir/interpret/intern.rs
@@ -278,9 +278,10 @@ pub fn intern_const_alloc_recursive(
// this `mutability` is the mutability of the place, ignoring the type
let (base_mutability, base_intern_mode) = match tcx.static_mutability(def_id) {
Some(hir::Mutability::MutImmutable) => (Mutability::Immutable, InternMode::Static),
None => (Mutability::Immutable, InternMode::ConstBase),
// `static mut` doesn't care about interior mutability, it's mutable anyway
Some(hir::Mutability::MutMutable) => (Mutability::Mutable, InternMode::Static),
// consts, promoteds. FIXME: what about array lengths, array initializers?
None => (Mutability::Immutable, InternMode::ConstBase),
};

// Type based interning.

0 comments on commit 5462ecb

Please sign in to comment.
You can’t perform that action at this time.