diff options
| author | Ralf Jung <post@ralfj.de> | 2020-08-14 11:18:55 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-08-14 11:18:55 +0200 |
| commit | 7805c200d982f11ab6dc3ead72bca89e9be4d294 (patch) | |
| tree | f926bd7a4127881c966b908553d9809637ccfb02 | |
| parent | 6e11329b54c2fc4e3ed73f84c1bce13f253cfed7 (diff) | |
| download | rust-7805c200d982f11ab6dc3ead72bca89e9be4d294.tar.gz rust-7805c200d982f11ab6dc3ead72bca89e9be4d294.zip | |
answer an old question re: intern kinds
| -rw-r--r-- | src/librustc_mir/interpret/intern.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/intern.rs b/src/librustc_mir/interpret/intern.rs index dffbc969c21..6c8ee72bc66 100644 --- a/src/librustc_mir/interpret/intern.rs +++ b/src/librustc_mir/interpret/intern.rs @@ -312,7 +312,8 @@ pub fn intern_const_alloc_recursive<M: CompileTimeMachine<'mir, 'tcx>>( let tcx = ecx.tcx; let base_intern_mode = match intern_kind { 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, }; |
