about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroli <github35764891676564198441@oli-obk.de>2021-01-05 12:10:56 +0000
committeroli <github35764891676564198441@oli-obk.de>2021-01-05 12:10:56 +0000
commit41a732dfd498af4d5eeed9943ead3692b2d1db0c (patch)
treea1957349d51c27a4ae2c6edb150b6e758b41316c
parent65ee418e5c2de7d84353979bbd978ca09390ccba (diff)
downloadrust-41a732dfd498af4d5eeed9943ead3692b2d1db0c.tar.gz
rust-41a732dfd498af4d5eeed9943ead3692b2d1db0c.zip
Remove a FIXME and explain the decision
-rw-r--r--compiler/rustc_mir/src/util/pretty.rs3
1 files changed, 2 insertions, 1 deletions
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),
         };