diff --git a/compiler/rustc_mir/src/util/pretty.rs b/compiler/rustc_mir/src/util/pretty.rs index 0d1abd63772..ca8bcffa896 100644 --- a/compiler/rustc_mir/src/util/pretty.rs +++ b/compiler/rustc_mir/src/util/pretty.rs @@ -274,7 +274,8 @@ pub fn write_mir_pretty<'tcx>( let mut first = true; for def_id in dump_mir_def_ids(tcx, single) { let body = match tcx.hir().body_const_context(def_id.expect_local()) { - // FIXME: print both MIRs for `const fn`? + // For `const fn` we want to render the optimized MIR. If you want the mir used in + // ctfe, you can dump the MIR after the `Deaggregator` optimization pass. None | Some(rustc_hir::ConstContext::ConstFn) => tcx.optimized_mir(def_id), Some(_) => tcx.mir_for_ctfe(def_id), };