Skip to content

Commit 9eaec13

Browse files
committed
Small comment adjustments
1 parent caeb3d5 commit 9eaec13

File tree

2 files changed

+3
-1
lines changed
  • compiler

2 files changed

+3
-1
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,6 @@ rustc_queries! {
935935
}
936936

937937
Codegen {
938-
// FIXME: remove after figuring out how to make miri able to detect non-Rust function calls
939938
query is_ctfe_mir_available(key: DefId) -> bool {
940939
desc { |tcx| "checking if item has ctfe mir available: `{}`", tcx.def_path_str(key) }
941940
}

compiler/rustc_mir/src/transform/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,9 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
542542
}
543543

544544
match tcx.hir().body_const_context(did) {
545+
/// Run the `mir_for_ctfe` query, which depends on `mir_drops_elaborated_and_const_checked`
546+
/// which we are going to steal below. Thus we need to run `mir_for_ctfe` first, so it
547+
/// computes and caches its result.
545548
Some(hir::ConstContext::ConstFn) => tcx.ensure().mir_for_ctfe(did),
546549
None => {}
547550
Some(other) => panic!("do not use `optimized_mir` for constants: {:?}", other),

0 commit comments

Comments
 (0)