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(
278
278
// this `mutability` is the mutability of the place, ignoring the type
279
279
let ( base_mutability, base_intern_mode) = match tcx. static_mutability ( def_id) {
280
280
Some ( hir:: Mutability :: MutImmutable ) => ( Mutability :: Immutable , InternMode :: Static ) ,
281
- None => ( Mutability :: Immutable , InternMode :: ConstBase ) ,
282
281
// `static mut` doesn't care about interior mutability, it's mutable anyway
283
282
Some ( hir:: Mutability :: MutMutable ) => ( Mutability :: Mutable , InternMode :: Static ) ,
283
+ // consts, promoteds. FIXME: what about array lengths, array initializers?
284
+ None => ( Mutability :: Immutable , InternMode :: ConstBase ) ,
284
285
} ;
285
286
286
287
// Type based interning.
You can’t perform that action at this time.
0 commit comments