Skip to content

Commit

Permalink
Remove a FIXME and explain the decision
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jan 5, 2021
1 parent 65ee418 commit 41a732d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_mir/src/util/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit 41a732d

Please sign in to comment.