Skip to content

Commit 7805c20

Browse files
committed
answer an old question re: intern kinds
1 parent 6e11329 commit 7805c20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/interpret/intern.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ pub fn intern_const_alloc_recursive<M: CompileTimeMachine<'mir, 'tcx>>(
312312
let tcx = ecx.tcx;
313313
let base_intern_mode = match intern_kind {
314314
InternKind::Static(mutbl) => InternMode::Static(mutbl),
315-
// FIXME: what about array lengths, array initializers?
315+
// `Constant` includes array lengths.
316+
// `Promoted` includes non-`Copy` array initializers and `rustc_args_required_const` arguments.
316317
InternKind::Constant | InternKind::Promoted => InternMode::ConstBase,
317318
};
318319

0 commit comments

Comments
 (0)