We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65ee418 commit 41a732dCopy full SHA for 41a732d
compiler/rustc_mir/src/util/pretty.rs
@@ -274,7 +274,8 @@ pub fn write_mir_pretty<'tcx>(
274
let mut first = true;
275
for def_id in dump_mir_def_ids(tcx, single) {
276
let body = match tcx.hir().body_const_context(def_id.expect_local()) {
277
- // FIXME: print both MIRs for `const fn`?
+ // For `const fn` we want to render the optimized MIR. If you want the mir used in
278
+ // ctfe, you can dump the MIR after the `Deaggregator` optimization pass.
279
None | Some(rustc_hir::ConstContext::ConstFn) => tcx.optimized_mir(def_id),
280
Some(_) => tcx.mir_for_ctfe(def_id),
281
};
0 commit comments