answer an old question re: intern kinds

This commit is contained in:
Ralf Jung 2020-08-14 11:18:55 +02:00
parent 6e11329b54
commit 7805c200d9

View File

@ -312,7 +312,8 @@ pub fn intern_const_alloc_recursive<M: CompileTimeMachine<'mir, 'tcx>>(
let tcx = ecx.tcx; let tcx = ecx.tcx;
let base_intern_mode = match intern_kind { let base_intern_mode = match intern_kind {
InternKind::Static(mutbl) => InternMode::Static(mutbl), InternKind::Static(mutbl) => InternMode::Static(mutbl),
// FIXME: what about array lengths, array initializers? // `Constant` includes array lengths.
// `Promoted` includes non-`Copy` array initializers and `rustc_args_required_const` arguments.
InternKind::Constant | InternKind::Promoted => InternMode::ConstBase, InternKind::Constant | InternKind::Promoted => InternMode::ConstBase,
}; };