Skip to content

Commit 41a732d

Browse files
committed
Remove a FIXME and explain the decision
1 parent 65ee418 commit 41a732d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_mir/src/util/pretty.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ pub fn write_mir_pretty<'tcx>(
274274
let mut first = true;
275275
for def_id in dump_mir_def_ids(tcx, single) {
276276
let body = match tcx.hir().body_const_context(def_id.expect_local()) {
277-
// FIXME: print both MIRs for `const fn`?
277+
// 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.
278279
None | Some(rustc_hir::ConstContext::ConstFn) => tcx.optimized_mir(def_id),
279280
Some(_) => tcx.mir_for_ctfe(def_id),
280281
};

0 commit comments

Comments
 (0)