Skip to content

Commit 8d77c2e

Browse files
committed
Don't validate / lint MIR before each pass
To avoid redundant work and verbose output in case of failures.
1 parent 928b3da commit 8d77c2e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

compiler/rustc_mir_transform/src/pass_manager.rs

-6
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,6 @@ fn run_passes_inner<'tcx>(
129129
if dump_enabled {
130130
dump_mir_for_pass(tcx, body, name, false);
131131
}
132-
if validate {
133-
validate_body(tcx, body, format!("before pass {name}"));
134-
}
135-
if lint {
136-
lint_body(tcx, body, format!("before pass {name}"));
137-
}
138132

139133
if let Some(prof_arg) = &prof_arg {
140134
tcx.sess

tests/ui/mir/lint/storage-live.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH]::multiple_storage)) (before pass CheckPackedRef) at bb0[1]:
1+
error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH]::multiple_storage)) (after pass CheckPackedRef) at bb0[1]:
22
StorageLive(_1) which already has storage here
33
--> $DIR/storage-live.rs:22:13
44
|

0 commit comments

Comments
 (0)