File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/librustc_mir/interpret Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments