Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c72cfdd

Browse files
authored
Rollup merge of rust-lang#124196 - RalfJung:mir-opt-tests, r=Mark-Simulacrum
mir-opt tests: rename unit-test -> test-mir-pass "unit-test" is extremely non-descriptive, no idea how one is supposed to read that and know that this specifies the MIR pass being tested.
2 parents b3f9117 + 75d0fdd commit c72cfdd

File tree

152 files changed

+157
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+157
-156
lines changed

src/tools/compiletest/src/header.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ mod directives {
244244
pub const STDERR_PER_BITWIDTH: &'static str = "stderr-per-bitwidth";
245245
pub const INCREMENTAL: &'static str = "incremental";
246246
pub const KNOWN_BUG: &'static str = "known-bug";
247-
pub const MIR_UNIT_TEST: &'static str = "unit-test";
247+
pub const TEST_MIR_PASS: &'static str = "test-mir-pass";
248248
pub const REMAP_SRC_BASE: &'static str = "remap-src-base";
249249
pub const COMPARE_OUTPUT_LINES_BY_SUBSET: &'static str = "compare-output-lines-by-subset";
250250
pub const LLVM_COV_FLAGS: &'static str = "llvm-cov-flags";
@@ -549,7 +549,7 @@ impl TestProps {
549549

550550
config.set_name_value_directive(
551551
ln,
552-
MIR_UNIT_TEST,
552+
TEST_MIR_PASS,
553553
&mut self.mir_unit_test,
554554
|s| s.trim().to_string(),
555555
);
@@ -922,7 +922,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
922922
"should-fail",
923923
"should-ice",
924924
"stderr-per-bitwidth",
925-
"unit-test",
925+
"test-mir-pass",
926926
"unset-exec-env",
927927
"unset-rustc-env",
928928
// tidy-alphabetical-end

tests/mir-opt/README.md

Lines changed: 4 additions & 3 deletions

tests/mir-opt/array_index_is_temporary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ unit-test: SimplifyCfg-pre-optimizations
1+
//@ test-mir-pass: SimplifyCfg-pre-optimizations
22
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
33
// Retagging (from Stacked Borrows) relies on the array index being a fresh
44
// temporary, so that side-effects cannot change it.

tests/mir-opt/basic_assignment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ unit-test: ElaborateDrops
1+
//@ test-mir-pass: ElaborateDrops
22
//@ needs-unwind
33
// this tests move up progration, which is not yet implemented
44

tests/mir-opt/box_expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ unit-test: ElaborateDrops
1+
//@ test-mir-pass: ElaborateDrops
22
//@ needs-unwind
33

44
#![feature(rustc_attrs, stmt_expr_attributes)]

tests/mir-opt/const_allocation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// skip-filecheck
2-
//@ unit-test: GVN
2+
//@ test-mir-pass: GVN
33
//@ ignore-endian-big
44
// EMIT_MIR_FOR_EACH_BIT_WIDTH
55
static FOO: &[(Option<i32>, &[&str])] =

tests/mir-opt/const_allocation2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// skip-filecheck
2-
//@ unit-test: GVN
2+
//@ test-mir-pass: GVN
33
//@ ignore-endian-big
44
// EMIT_MIR_FOR_EACH_BIT_WIDTH
55
// EMIT_MIR const_allocation2.main.GVN.after.mir

tests/mir-opt/const_allocation3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// skip-filecheck
2-
//@ unit-test: GVN
2+
//@ test-mir-pass: GVN
33
//@ ignore-endian-big
44
// EMIT_MIR_FOR_EACH_BIT_WIDTH
55
// EMIT_MIR const_allocation3.main.GVN.after.mir

tests/mir-opt/const_debuginfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ unit-test: ConstDebugInfo
1+
//@ test-mir-pass: ConstDebugInfo
22
//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN
33

44
struct Point {

tests/mir-opt/const_prop/address_of_pair.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ unit-test: GVN
1+
//@ test-mir-pass: GVN
22

33
// EMIT_MIR address_of_pair.fn0.GVN.diff
44
pub fn fn0() -> bool {

0 commit comments

Comments
 (0)