about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-11-06 23:12:06 +0100
committerGitHub <noreply@github.com>2021-11-06 23:12:06 +0100
commitec471de865b6f93f384d1903cc53c39a6057a8aa (patch)
tree0ecd233e105bb14a13334c70f0fa2102e40352b7 /compiler/rustc_mir_transform/src
parent43fee0e0a9ffae276d5b0e92e3243a6eccaadcd7 (diff)
parenta3776d99ccdd60d3f880005e4fe4e9478768ea41 (diff)
downloadrust-ec471de865b6f93f384d1903cc53c39a6057a8aa.tar.gz
rust-ec471de865b6f93f384d1903cc53c39a6057a8aa.zip
Rollup merge of #90649 - cjgillot:reveal-all-2, r=lcnr
Run reveal_all on MIR when inlining is activated.

Fix logic error in https://github.com/rust-lang/rust/pull/85254 which prevented the pass from running when needed.
Fixes https://github.com/rust-lang/rust/issues/78442
r? ``@lcnr``
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/reveal_all.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/reveal_all.rs b/compiler/rustc_mir_transform/src/reveal_all.rs
index 7b4eb4912cb..6c423a2bb57 100644
--- a/compiler/rustc_mir_transform/src/reveal_all.rs
+++ b/compiler/rustc_mir_transform/src/reveal_all.rs
@@ -11,7 +11,7 @@ impl<'tcx> MirPass<'tcx> for RevealAll {
     fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
         // This pass must run before inlining, since we insert callee bodies in RevealAll mode.
         // Do not apply this transformation to generators.
-        if (tcx.sess.mir_opt_level() >= 3 || !super::inline::is_enabled(tcx))
+        if (tcx.sess.mir_opt_level() >= 3 || super::inline::is_enabled(tcx))
             && body.generator.is_none()
         {
             let param_env = tcx.param_env_reveal_all_normalized(body.source.def_id());