about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2023-12-21 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2023-12-21 00:00:00 +0000
commitba430a36c0edbc24e525cfd53303997d478307c5 (patch)
tree12f5670692da0b3bae633f256190736710ac4073
parent532080cfcccdfd853008c4452b283130b544c675 (diff)
downloadrust-ba430a36c0edbc24e525cfd53303997d478307c5.tar.gz
rust-ba430a36c0edbc24e525cfd53303997d478307c5.zip
Enable -Zlint-mir by default for mir-opt tests
-rw-r--r--src/tools/compiletest/src/runtest.rs1
-rw-r--r--tests/mir-opt/reference_prop.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 5d53a4d28f2..ca80328f3ac 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2445,6 +2445,7 @@ impl<'test> TestCx<'test> {
                     "-Copt-level=1",
                     &zdump_arg,
                     "-Zvalidate-mir",
+                    "-Zlint-mir",
                     "-Zdump-mir-exclude-pass-number",
                 ]);
                 if let Some(pass) = &self.props.mir_unit_test {
diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs
index 1b9c8fe15c2..8adfbb4535b 100644
--- a/tests/mir-opt/reference_prop.rs
+++ b/tests/mir-opt/reference_prop.rs
@@ -1,3 +1,4 @@
+// compile-flags: -Zlint-mir=no
 // unit-test: ReferencePropagation
 // needs-unwind