diff options
| author | oli <github35764891676564198441@oli-obk.de> | 2020-12-26 14:50:32 +0000 |
|---|---|---|
| committer | oli <github35764891676564198441@oli-obk.de> | 2021-01-04 21:40:38 +0000 |
| commit | 9eaec139d0a71993f5b4eeef739bd565123b607e (patch) | |
| tree | 545eb900593ac8a48caa77b462fc164b96701b4c /compiler/rustc_mir/src/transform/mod.rs | |
| parent | caeb3d525d297af51f7c7b509fafbaa32db9ed3e (diff) | |
| download | rust-9eaec139d0a71993f5b4eeef739bd565123b607e.tar.gz rust-9eaec139d0a71993f5b4eeef739bd565123b607e.zip | |
Small comment adjustments
Diffstat (limited to 'compiler/rustc_mir/src/transform/mod.rs')
| -rw-r--r-- | compiler/rustc_mir/src/transform/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_mir/src/transform/mod.rs b/compiler/rustc_mir/src/transform/mod.rs index 03e27991d93..a9bc11502bb 100644 --- a/compiler/rustc_mir/src/transform/mod.rs +++ b/compiler/rustc_mir/src/transform/mod.rs @@ -542,6 +542,9 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> { } match tcx.hir().body_const_context(did) { + /// Run the `mir_for_ctfe` query, which depends on `mir_drops_elaborated_and_const_checked` + /// which we are going to steal below. Thus we need to run `mir_for_ctfe` first, so it + /// computes and caches its result. Some(hir::ConstContext::ConstFn) => tcx.ensure().mir_for_ctfe(did), None => {} Some(other) => panic!("do not use `optimized_mir` for constants: {:?}", other), |
