Small comment adjustments
This commit is contained in:
parent
caeb3d525d
commit
9eaec139d0
2 changed files with 3 additions and 1 deletions
|
@ -935,7 +935,6 @@ rustc_queries! {
|
||||||
}
|
}
|
||||||
|
|
||||||
Codegen {
|
Codegen {
|
||||||
// FIXME: remove after figuring out how to make miri able to detect non-Rust function calls
|
|
||||||
query is_ctfe_mir_available(key: DefId) -> bool {
|
query is_ctfe_mir_available(key: DefId) -> bool {
|
||||||
desc { |tcx| "checking if item has ctfe mir available: `{}`", tcx.def_path_str(key) }
|
desc { |tcx| "checking if item has ctfe mir available: `{}`", tcx.def_path_str(key) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -542,6 +542,9 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
|
||||||
}
|
}
|
||||||
|
|
||||||
match tcx.hir().body_const_context(did) {
|
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),
|
Some(hir::ConstContext::ConstFn) => tcx.ensure().mir_for_ctfe(did),
|
||||||
None => {}
|
None => {}
|
||||||
Some(other) => panic!("do not use `optimized_mir` for constants: {:?}", other),
|
Some(other) => panic!("do not use `optimized_mir` for constants: {:?}", other),
|
||||||
|
|
Loading…
Add table
Reference in a new issue