about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-30 09:42:05 +0000
committerbors <bors@rust-lang.org>2023-12-30 09:42:05 +0000
commitc2354aabeaac01f1530b4439eb2339b1c15aceb4 (patch)
treecf7b56a216335c296edc94c981d1fe12144e5bf0
parentddca5343f2988f49fa407dc1ff43bcf779ea4173 (diff)
parent8d77c2eab8b74d6731c6811a1df54f444559cb04 (diff)
downloadrust-c2354aabeaac01f1530b4439eb2339b1c15aceb4.tar.gz
rust-c2354aabeaac01f1530b4439eb2339b1c15aceb4.zip
Auto merge of #119377 - tmiasko:after, r=cjgillot
Don't validate / lint MIR before each pass

To avoid redundant work and verbose output in case of failures.
-rw-r--r--compiler/rustc_mir_transform/src/pass_manager.rs6
-rw-r--r--tests/ui/mir/lint/storage-live.stderr2
2 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_mir_transform/src/pass_manager.rs b/compiler/rustc_mir_transform/src/pass_manager.rs
index 1da1c1920b2..82074f1960d 100644
--- a/compiler/rustc_mir_transform/src/pass_manager.rs
+++ b/compiler/rustc_mir_transform/src/pass_manager.rs
@@ -129,12 +129,6 @@ fn run_passes_inner<'tcx>(
             if dump_enabled {
                 dump_mir_for_pass(tcx, body, name, false);
             }
-            if validate {
-                validate_body(tcx, body, format!("before pass {name}"));
-            }
-            if lint {
-                lint_body(tcx, body, format!("before pass {name}"));
-            }
 
             if let Some(prof_arg) = &prof_arg {
                 tcx.sess
diff --git a/tests/ui/mir/lint/storage-live.stderr b/tests/ui/mir/lint/storage-live.stderr
index 1037ddc88ef..02156dd858d 100644
--- a/tests/ui/mir/lint/storage-live.stderr
+++ b/tests/ui/mir/lint/storage-live.stderr
@@ -1,4 +1,4 @@
-error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH]::multiple_storage)) (before pass CheckPackedRef) at bb0[1]:
+error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH]::multiple_storage)) (after pass CheckPackedRef) at bb0[1]:
                                 StorageLive(_1) which already has storage here
   --> $DIR/storage-live.rs:22:13
    |