From 75d0fdd96713874703998cb06dae67ab09b7897e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 20 Apr 2024 13:19:34 +0200 Subject: [PATCH] mir-opt tests: rename unit-test -> test-mir-pass --- src/tools/compiletest/src/header.rs | 6 +++--- tests/mir-opt/README.md | 7 ++++--- tests/mir-opt/array_index_is_temporary.rs | 2 +- tests/mir-opt/basic_assignment.rs | 2 +- tests/mir-opt/box_expr.rs | 2 +- tests/mir-opt/const_allocation.rs | 2 +- tests/mir-opt/const_allocation2.rs | 2 +- tests/mir-opt/const_allocation3.rs | 2 +- tests/mir-opt/const_debuginfo.rs | 2 +- tests/mir-opt/const_prop/address_of_pair.rs | 2 +- tests/mir-opt/const_prop/aggregate.rs | 2 +- tests/mir-opt/const_prop/array_index.rs | 2 +- tests/mir-opt/const_prop/bad_op_div_by_zero.rs | 2 +- tests/mir-opt/const_prop/bad_op_mod_by_zero.rs | 2 +- tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs | 2 +- tests/mir-opt/const_prop/boolean_identities.rs | 2 +- tests/mir-opt/const_prop/boxes.rs | 2 +- tests/mir-opt/const_prop/cast.rs | 2 +- tests/mir-opt/const_prop/checked_add.rs | 2 +- tests/mir-opt/const_prop/control_flow_simplification.rs | 2 +- tests/mir-opt/const_prop/discriminant.rs | 2 +- tests/mir-opt/const_prop/indirect.rs | 2 +- tests/mir-opt/const_prop/indirect_mutation.rs | 2 +- tests/mir-opt/const_prop/inherit_overflow.rs | 2 +- tests/mir-opt/const_prop/invalid_constant.rs | 2 +- tests/mir-opt/const_prop/issue_66971.rs | 2 +- tests/mir-opt/const_prop/issue_67019.rs | 2 +- tests/mir-opt/const_prop/large_array_index.rs | 2 +- tests/mir-opt/const_prop/mult_by_zero.rs | 2 +- tests/mir-opt/const_prop/mutable_variable.rs | 2 +- tests/mir-opt/const_prop/mutable_variable_aggregate.rs | 2 +- .../const_prop/mutable_variable_aggregate_mut_ref.rs | 2 +- .../const_prop/mutable_variable_aggregate_partial_read.rs | 2 +- tests/mir-opt/const_prop/mutable_variable_no_prop.rs | 2 +- tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs | 2 +- tests/mir-opt/const_prop/offset_of.rs | 2 +- .../mir-opt/const_prop/overwrite_with_const_with_params.rs | 2 +- tests/mir-opt/const_prop/pointer_expose_provenance.rs | 2 +- tests/mir-opt/const_prop/read_immutable_static.rs | 2 +- tests/mir-opt/const_prop/ref_deref.rs | 2 +- tests/mir-opt/const_prop/ref_deref_project.rs | 2 +- tests/mir-opt/const_prop/reify_fn_ptr.rs | 2 +- tests/mir-opt/const_prop/repeat.rs | 2 +- tests/mir-opt/const_prop/return_place.rs | 2 +- tests/mir-opt/const_prop/scalar_literal_propagation.rs | 2 +- tests/mir-opt/const_prop/slice_len.rs | 2 +- tests/mir-opt/const_prop/switch_int.rs | 2 +- tests/mir-opt/const_prop/transmute.rs | 2 +- tests/mir-opt/const_prop/tuple_literal_propagation.rs | 2 +- tests/mir-opt/const_prop/while_let_loops.rs | 2 +- tests/mir-opt/copy-prop/borrowed_local.rs | 2 +- tests/mir-opt/copy-prop/branch.rs | 2 +- tests/mir-opt/copy-prop/calls.rs | 2 +- tests/mir-opt/copy-prop/copy_propagation_arg.rs | 2 +- tests/mir-opt/copy-prop/custom_move_arg.rs | 2 +- tests/mir-opt/copy-prop/cycle.rs | 2 +- tests/mir-opt/copy-prop/dead_stores_79191.rs | 2 +- tests/mir-opt/copy-prop/dead_stores_better.rs | 2 +- tests/mir-opt/copy-prop/issue_107511.rs | 2 +- tests/mir-opt/copy-prop/move_arg.rs | 2 +- tests/mir-opt/copy-prop/move_projection.rs | 2 +- tests/mir-opt/copy-prop/mutate_through_pointer.rs | 2 +- tests/mir-opt/copy-prop/non_dominate.rs | 2 +- tests/mir-opt/copy-prop/partial_init.rs | 2 +- tests/mir-opt/copy-prop/reborrow.rs | 2 +- tests/mir-opt/dataflow-const-prop/array_index.rs | 2 +- tests/mir-opt/dataflow-const-prop/boolean_identities.rs | 2 +- tests/mir-opt/dataflow-const-prop/cast.rs | 2 +- tests/mir-opt/dataflow-const-prop/checked.rs | 2 +- tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs | 2 +- tests/mir-opt/dataflow-const-prop/enum.rs | 2 +- tests/mir-opt/dataflow-const-prop/if.rs | 2 +- tests/mir-opt/dataflow-const-prop/inherit_overflow.rs | 2 +- tests/mir-opt/dataflow-const-prop/issue_81605.rs | 2 +- tests/mir-opt/dataflow-const-prop/large_array_index.rs | 2 +- tests/mir-opt/dataflow-const-prop/mult_by_zero.rs | 2 +- tests/mir-opt/dataflow-const-prop/offset_of.rs | 2 +- tests/mir-opt/dataflow-const-prop/ref_without_sb.rs | 2 +- tests/mir-opt/dataflow-const-prop/repeat.rs | 2 +- tests/mir-opt/dataflow-const-prop/repr_transparent.rs | 2 +- tests/mir-opt/dataflow-const-prop/self_assign.rs | 2 +- tests/mir-opt/dataflow-const-prop/self_assign_add.rs | 2 +- tests/mir-opt/dataflow-const-prop/sibling_ptr.rs | 2 +- tests/mir-opt/dataflow-const-prop/slice_len.rs | 2 +- tests/mir-opt/dataflow-const-prop/struct.rs | 2 +- tests/mir-opt/dataflow-const-prop/terminator.rs | 2 +- tests/mir-opt/dataflow-const-prop/transmute.rs | 2 +- tests/mir-opt/dataflow-const-prop/tuple.rs | 2 +- tests/mir-opt/dead-store-elimination/call_arg_copy.rs | 2 +- tests/mir-opt/dead-store-elimination/cycle.rs | 2 +- tests/mir-opt/dead-store-elimination/place_mention.rs | 2 +- .../mir-opt/dead-store-elimination/provenance_soundness.rs | 2 +- tests/mir-opt/deduplicate_blocks.rs | 2 +- tests/mir-opt/derefer_complex_case.rs | 2 +- tests/mir-opt/derefer_inline_test.rs | 2 +- tests/mir-opt/derefer_terminator_test.rs | 2 +- tests/mir-opt/derefer_test.rs | 2 +- tests/mir-opt/derefer_test_multiple.rs | 2 +- tests/mir-opt/dest-prop/branch.rs | 2 +- tests/mir-opt/dest-prop/copy_propagation_arg.rs | 2 +- tests/mir-opt/dest-prop/cycle.rs | 2 +- tests/mir-opt/dest-prop/dead_stores_79191.rs | 2 +- tests/mir-opt/dest-prop/dead_stores_better.rs | 2 +- tests/mir-opt/dest-prop/simple.rs | 2 +- tests/mir-opt/dont_inline_type_id.rs | 2 +- tests/mir-opt/early_otherwise_branch.rs | 2 +- tests/mir-opt/early_otherwise_branch_3_element_tuple.rs | 2 +- tests/mir-opt/early_otherwise_branch_68867.rs | 2 +- tests/mir-opt/early_otherwise_branch_noopt.rs | 2 +- tests/mir-opt/early_otherwise_branch_soundness.rs | 2 +- tests/mir-opt/enum_opt.rs | 2 +- tests/mir-opt/gvn.rs | 2 +- tests/mir-opt/gvn_copy_moves.rs | 2 +- tests/mir-opt/gvn_uninhabited.rs | 2 +- tests/mir-opt/if_condition_int.rs | 2 +- tests/mir-opt/inline/indirect_destination.rs | 2 +- tests/mir-opt/inline/inline_box_fn.rs | 2 +- tests/mir-opt/inline/unit_test.rs | 2 +- tests/mir-opt/inline_coroutine_body.rs | 2 +- tests/mir-opt/inline_generically_if_sized.rs | 2 +- tests/mir-opt/instrument_coverage.rs | 2 +- tests/mir-opt/instrument_coverage_cleanup.rs | 2 +- tests/mir-opt/instsimplify/bool_compare.rs | 2 +- tests/mir-opt/instsimplify/casts.rs | 2 +- tests/mir-opt/instsimplify/combine_array_len.rs | 2 +- tests/mir-opt/instsimplify/combine_clone_of_primitives.rs | 2 +- tests/mir-opt/instsimplify/combine_transmutes.rs | 2 +- tests/mir-opt/instsimplify/duplicate_switch_targets.rs | 2 +- tests/mir-opt/instsimplify/intrinsic_asserts.rs | 2 +- tests/mir-opt/instsimplify/ub_check.rs | 2 +- tests/mir-opt/issue_101973.rs | 2 +- tests/mir-opt/jump_threading.rs | 2 +- tests/mir-opt/lower_array_len.rs | 2 +- tests/mir-opt/lower_intrinsics.rs | 2 +- tests/mir-opt/lower_slice_len.rs | 2 +- tests/mir-opt/matches_reduce_branches.rs | 2 +- tests/mir-opt/matches_u8.rs | 2 +- tests/mir-opt/nrvo_miscompile_111005.rs | 2 +- tests/mir-opt/nrvo_simple.rs | 2 +- tests/mir-opt/reference_prop.rs | 2 +- tests/mir-opt/remove_storage_markers.rs | 2 +- tests/mir-opt/retag.rs | 2 +- tests/mir-opt/set_no_discriminant.rs | 2 +- tests/mir-opt/simplify_dead_blocks.rs | 2 +- tests/mir-opt/simplify_locals.rs | 2 +- tests/mir-opt/simplify_locals_removes_unused_consts.rs | 2 +- .../simplify_locals_removes_unused_discriminant_reads.rs | 2 +- tests/mir-opt/sroa/lifetimes.rs | 2 +- tests/mir-opt/sroa/structs.rs | 2 +- tests/mir-opt/unreachable.rs | 2 +- tests/mir-opt/unreachable_diverging.rs | 2 +- tests/mir-opt/unreachable_enum_branching.rs | 2 +- 152 files changed, 157 insertions(+), 156 deletions(-) diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index f5d7ce1c5f9a0..8aafbb3e39926 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -244,7 +244,7 @@ mod directives { pub const STDERR_PER_BITWIDTH: &'static str = "stderr-per-bitwidth"; pub const INCREMENTAL: &'static str = "incremental"; pub const KNOWN_BUG: &'static str = "known-bug"; - pub const MIR_UNIT_TEST: &'static str = "unit-test"; + pub const TEST_MIR_PASS: &'static str = "test-mir-pass"; pub const REMAP_SRC_BASE: &'static str = "remap-src-base"; pub const COMPARE_OUTPUT_LINES_BY_SUBSET: &'static str = "compare-output-lines-by-subset"; pub const LLVM_COV_FLAGS: &'static str = "llvm-cov-flags"; @@ -549,7 +549,7 @@ impl TestProps { config.set_name_value_directive( ln, - MIR_UNIT_TEST, + TEST_MIR_PASS, &mut self.mir_unit_test, |s| s.trim().to_string(), ); @@ -922,7 +922,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "should-fail", "should-ice", "stderr-per-bitwidth", - "unit-test", + "test-mir-pass", "unset-exec-env", "unset-rustc-env", // tidy-alphabetical-end diff --git a/tests/mir-opt/README.md b/tests/mir-opt/README.md index 39a7b5aea123d..e4b252f5565b0 100644 --- a/tests/mir-opt/README.md +++ b/tests/mir-opt/README.md @@ -14,17 +14,18 @@ presence of pointers in constants or other bit width dependent things. In that c to your test, causing separate files to be generated for 32bit and 64bit systems. -## Unit testing +## Testing a particular MIR pass If you are only testing the behavior of a particular mir-opt pass on some specific input (as is usually the case), you should add ``` -// unit-test: PassName +//@ test-mir-pass: PassName ``` to the top of the file. This makes sure that other passes don't run which means you'll get the input -you expected and your test won't break when other code changes. +you expected and your test won't break when other code changes. This also lets you test passes +that are disabled by default. ## Emit a diff of the mir for a specific optimization diff --git a/tests/mir-opt/array_index_is_temporary.rs b/tests/mir-opt/array_index_is_temporary.rs index 500b8b7f7c74e..cd44c31d00048 100644 --- a/tests/mir-opt/array_index_is_temporary.rs +++ b/tests/mir-opt/array_index_is_temporary.rs @@ -1,4 +1,4 @@ -//@ unit-test: SimplifyCfg-pre-optimizations +//@ test-mir-pass: SimplifyCfg-pre-optimizations // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Retagging (from Stacked Borrows) relies on the array index being a fresh // temporary, so that side-effects cannot change it. diff --git a/tests/mir-opt/basic_assignment.rs b/tests/mir-opt/basic_assignment.rs index 0a23cddf620b4..a9342c13e1556 100644 --- a/tests/mir-opt/basic_assignment.rs +++ b/tests/mir-opt/basic_assignment.rs @@ -1,4 +1,4 @@ -//@ unit-test: ElaborateDrops +//@ test-mir-pass: ElaborateDrops //@ needs-unwind // this tests move up progration, which is not yet implemented diff --git a/tests/mir-opt/box_expr.rs b/tests/mir-opt/box_expr.rs index 8c016629770bc..a2d3ab94db65e 100644 --- a/tests/mir-opt/box_expr.rs +++ b/tests/mir-opt/box_expr.rs @@ -1,4 +1,4 @@ -//@ unit-test: ElaborateDrops +//@ test-mir-pass: ElaborateDrops //@ needs-unwind #![feature(rustc_attrs, stmt_expr_attributes)] diff --git a/tests/mir-opt/const_allocation.rs b/tests/mir-opt/const_allocation.rs index 038caaa0ae730..e65b2ed9a879c 100644 --- a/tests/mir-opt/const_allocation.rs +++ b/tests/mir-opt/const_allocation.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH static FOO: &[(Option, &[&str])] = diff --git a/tests/mir-opt/const_allocation2.rs b/tests/mir-opt/const_allocation2.rs index ba987c1c26b95..0681d4356dd8e 100644 --- a/tests/mir-opt/const_allocation2.rs +++ b/tests/mir-opt/const_allocation2.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR const_allocation2.main.GVN.after.mir diff --git a/tests/mir-opt/const_allocation3.rs b/tests/mir-opt/const_allocation3.rs index 86ffdef24abab..46be3e1e36e87 100644 --- a/tests/mir-opt/const_allocation3.rs +++ b/tests/mir-opt/const_allocation3.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR const_allocation3.main.GVN.after.mir diff --git a/tests/mir-opt/const_debuginfo.rs b/tests/mir-opt/const_debuginfo.rs index 319bcf484111e..b880d7e07a6e4 100644 --- a/tests/mir-opt/const_debuginfo.rs +++ b/tests/mir-opt/const_debuginfo.rs @@ -1,4 +1,4 @@ -//@ unit-test: ConstDebugInfo +//@ test-mir-pass: ConstDebugInfo //@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN struct Point { diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs index c6bd576699035..6d0c0f8ad52a7 100644 --- a/tests/mir-opt/const_prop/address_of_pair.rs +++ b/tests/mir-opt/const_prop/address_of_pair.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR address_of_pair.fn0.GVN.diff pub fn fn0() -> bool { diff --git a/tests/mir-opt/const_prop/aggregate.rs b/tests/mir-opt/const_prop/aggregate.rs index 2db477077728c..8f8f92bbba19b 100644 --- a/tests/mir-opt/const_prop/aggregate.rs +++ b/tests/mir-opt/const_prop/aggregate.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -O // EMIT_MIR aggregate.main.GVN.diff diff --git a/tests/mir-opt/const_prop/array_index.rs b/tests/mir-opt/const_prop/array_index.rs index 2a9ca5f95e65d..aff72268223b2 100644 --- a/tests/mir-opt/const_prop/array_index.rs +++ b/tests/mir-opt/const_prop/array_index.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs index c411d3b59ab26..6c576718ac878 100644 --- a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs +++ b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR bad_op_div_by_zero.main.GVN.diff diff --git a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs index aa09c1639b35a..b7623dc23da1b 100644 --- a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs +++ b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR bad_op_mod_by_zero.main.GVN.diff diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs index 25d513e213273..0f8d278535dc7 100644 --- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs +++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/boolean_identities.rs b/tests/mir-opt/const_prop/boolean_identities.rs index cbc106aa41cac..f23749312f232 100644 --- a/tests/mir-opt/const_prop/boolean_identities.rs +++ b/tests/mir-opt/const_prop/boolean_identities.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR boolean_identities.test.GVN.diff pub fn test(x: bool, y: bool) -> bool { diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs index 859491cf3614f..7813352261e53 100644 --- a/tests/mir-opt/const_prop/boxes.rs +++ b/tests/mir-opt/const_prop/boxes.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -O // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/const_prop/cast.rs b/tests/mir-opt/const_prop/cast.rs index ad95515b41b59..dce2e38fa9173 100644 --- a/tests/mir-opt/const_prop/cast.rs +++ b/tests/mir-opt/const_prop/cast.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR cast.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/checked_add.rs b/tests/mir-opt/const_prop/checked_add.rs index 6f43e6abdc1eb..0560b04957311 100644 --- a/tests/mir-opt/const_prop/checked_add.rs +++ b/tests/mir-opt/const_prop/checked_add.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -C overflow-checks=on // EMIT_MIR checked_add.main.GVN.diff diff --git a/tests/mir-opt/const_prop/control_flow_simplification.rs b/tests/mir-opt/const_prop/control_flow_simplification.rs index eb336827dc296..39b5f28983064 100644 --- a/tests/mir-opt/const_prop/control_flow_simplification.rs +++ b/tests/mir-opt/const_prop/control_flow_simplification.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -Zmir-opt-level=1 trait NeedsDrop: Sized { diff --git a/tests/mir-opt/const_prop/discriminant.rs b/tests/mir-opt/const_prop/discriminant.rs index 51542afa4bc3d..aa169eb4e3699 100644 --- a/tests/mir-opt/const_prop/discriminant.rs +++ b/tests/mir-opt/const_prop/discriminant.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with // `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect` diff --git a/tests/mir-opt/const_prop/indirect.rs b/tests/mir-opt/const_prop/indirect.rs index 5c469c5d844a5..ca53e2b2f2b00 100644 --- a/tests/mir-opt/const_prop/indirect.rs +++ b/tests/mir-opt/const_prop/indirect.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -C overflow-checks=on // EMIT_MIR indirect.main.GVN.diff diff --git a/tests/mir-opt/const_prop/indirect_mutation.rs b/tests/mir-opt/const_prop/indirect_mutation.rs index b2a9d5db367a6..32ff8f142b1e7 100644 --- a/tests/mir-opt/const_prop/indirect_mutation.rs +++ b/tests/mir-opt/const_prop/indirect_mutation.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // Check that we do not propagate past an indirect mutation. #![feature(raw_ref_op)] diff --git a/tests/mir-opt/const_prop/inherit_overflow.rs b/tests/mir-opt/const_prop/inherit_overflow.rs index e71a05ce760ba..c37f3fdb86475 100644 --- a/tests/mir-opt/const_prop/inherit_overflow.rs +++ b/tests/mir-opt/const_prop/inherit_overflow.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -Zmir-enable-passes=+Inline // After inlining, this will contain a `CheckedBinaryOp`. diff --git a/tests/mir-opt/const_prop/invalid_constant.rs b/tests/mir-opt/const_prop/invalid_constant.rs index 1df82f2ee79de..afd8746af5fb4 100644 --- a/tests/mir-opt/const_prop/invalid_constant.rs +++ b/tests/mir-opt/const_prop/invalid_constant.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -Zmir-enable-passes=+RemoveZsts // Verify that we can pretty print invalid constants. diff --git a/tests/mir-opt/const_prop/issue_66971.rs b/tests/mir-opt/const_prop/issue_66971.rs index 30a9d62d499e4..03f34969bf3e8 100644 --- a/tests/mir-opt/const_prop/issue_66971.rs +++ b/tests/mir-opt/const_prop/issue_66971.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN // Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected // outputs below, after GVN this is how _2 would look like with the bug: diff --git a/tests/mir-opt/const_prop/issue_67019.rs b/tests/mir-opt/const_prop/issue_67019.rs index bf788b924ce19..e13c74429164b 100644 --- a/tests/mir-opt/const_prop/issue_67019.rs +++ b/tests/mir-opt/const_prop/issue_67019.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN // This used to ICE in const-prop diff --git a/tests/mir-opt/const_prop/large_array_index.rs b/tests/mir-opt/const_prop/large_array_index.rs index 1cefc85676ff6..afba73f6a17f7 100644 --- a/tests/mir-opt/const_prop/large_array_index.rs +++ b/tests/mir-opt/const_prop/large_array_index.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/mult_by_zero.rs b/tests/mir-opt/const_prop/mult_by_zero.rs index d79f3e851615b..7943c74c9ee7a 100644 --- a/tests/mir-opt/const_prop/mult_by_zero.rs +++ b/tests/mir-opt/const_prop/mult_by_zero.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR mult_by_zero.test.GVN.diff fn test(x: i32) -> i32 { diff --git a/tests/mir-opt/const_prop/mutable_variable.rs b/tests/mir-opt/const_prop/mutable_variable.rs index 4445bd224802e..9698fba6a11ac 100644 --- a/tests/mir-opt/const_prop/mutable_variable.rs +++ b/tests/mir-opt/const_prop/mutable_variable.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR mutable_variable.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs index c2b2731b2a6c9..7de647ed9c37f 100644 --- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs +++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR mutable_variable_aggregate.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs index c9f09f878fe5c..5656c0e7a6863 100644 --- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs +++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR mutable_variable_aggregate_mut_ref.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs index 5b7804b11647e..6f99e6be246fa 100644 --- a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs +++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR mutable_variable_aggregate_partial_read.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs index 9ea2e78d8b20e..8289832f81ea3 100644 --- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs +++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // Verify that we do not propagate the contents of this mutable static. static mut STATIC: u32 = 0x42424242; diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs index 39ac1fa3c946a..cc92949128f72 100644 --- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs +++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR mutable_variable_unprop_assign.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/offset_of.rs b/tests/mir-opt/const_prop/offset_of.rs index 7d258f2e36280..105cbfb53dd0b 100644 --- a/tests/mir-opt/const_prop/offset_of.rs +++ b/tests/mir-opt/const_prop/offset_of.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(offset_of_enum, offset_of_nested)] diff --git a/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs b/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs index 535870fdf88ea..a43558223fe1a 100644 --- a/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs +++ b/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -O // Regression test for https://github.com/rust-lang/rust/issues/118328 diff --git a/tests/mir-opt/const_prop/pointer_expose_provenance.rs b/tests/mir-opt/const_prop/pointer_expose_provenance.rs index 840a4d65f3d79..f148a5b6542e0 100644 --- a/tests/mir-opt/const_prop/pointer_expose_provenance.rs +++ b/tests/mir-opt/const_prop/pointer_expose_provenance.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: GVN +//@ test-mir-pass: GVN #[inline(never)] fn read(_: usize) { } diff --git a/tests/mir-opt/const_prop/read_immutable_static.rs b/tests/mir-opt/const_prop/read_immutable_static.rs index ec2dbf6485a86..05fec2f3303b0 100644 --- a/tests/mir-opt/const_prop/read_immutable_static.rs +++ b/tests/mir-opt/const_prop/read_immutable_static.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN static FOO: u8 = 2; diff --git a/tests/mir-opt/const_prop/ref_deref.rs b/tests/mir-opt/const_prop/ref_deref.rs index 20c1fba52099d..aef36323cc033 100644 --- a/tests/mir-opt/const_prop/ref_deref.rs +++ b/tests/mir-opt/const_prop/ref_deref.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR ref_deref.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/ref_deref_project.rs b/tests/mir-opt/const_prop/ref_deref_project.rs index 59e7f1a50b80d..5a48a887f93d7 100644 --- a/tests/mir-opt/const_prop/ref_deref_project.rs +++ b/tests/mir-opt/const_prop/ref_deref_project.rs @@ -1,5 +1,5 @@ // This does not currently propagate (#67862) -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR ref_deref_project.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.rs b/tests/mir-opt/const_prop/reify_fn_ptr.rs index 55dca24f3d2e9..ffce4e97f5de1 100644 --- a/tests/mir-opt/const_prop/reify_fn_ptr.rs +++ b/tests/mir-opt/const_prop/reify_fn_ptr.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR reify_fn_ptr.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/repeat.rs b/tests/mir-opt/const_prop/repeat.rs index d881462b877e7..d778191389518 100644 --- a/tests/mir-opt/const_prop/repeat.rs +++ b/tests/mir-opt/const_prop/repeat.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/return_place.rs b/tests/mir-opt/const_prop/return_place.rs index fea28c93dc3dc..e7eea11ae492f 100644 --- a/tests/mir-opt/const_prop/return_place.rs +++ b/tests/mir-opt/const_prop/return_place.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //@ compile-flags: -C overflow-checks=on diff --git a/tests/mir-opt/const_prop/scalar_literal_propagation.rs b/tests/mir-opt/const_prop/scalar_literal_propagation.rs index e077746835068..9d02f24e76bd6 100644 --- a/tests/mir-opt/const_prop/scalar_literal_propagation.rs +++ b/tests/mir-opt/const_prop/scalar_literal_propagation.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR scalar_literal_propagation.main.GVN.diff diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs index 4a48f92ec2b43..63cdbf01b3e82 100644 --- a/tests/mir-opt/const_prop/slice_len.rs +++ b/tests/mir-opt/const_prop/slice_len.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -Zmir-enable-passes=+InstSimplify // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/switch_int.rs b/tests/mir-opt/const_prop/switch_int.rs index a176bf1443898..114380e316ded 100644 --- a/tests/mir-opt/const_prop/switch_int.rs +++ b/tests/mir-opt/const_prop/switch_int.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/const_prop/transmute.rs b/tests/mir-opt/const_prop/transmute.rs index 5f2d76711599b..9cbf8928753b7 100644 --- a/tests/mir-opt/const_prop/transmute.rs +++ b/tests/mir-opt/const_prop/transmute.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -O --crate-type=lib //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.rs b/tests/mir-opt/const_prop/tuple_literal_propagation.rs index 5992bb151d3e1..582411c7b59e1 100644 --- a/tests/mir-opt/const_prop/tuple_literal_propagation.rs +++ b/tests/mir-opt/const_prop/tuple_literal_propagation.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR tuple_literal_propagation.main.GVN.diff diff --git a/tests/mir-opt/const_prop/while_let_loops.rs b/tests/mir-opt/const_prop/while_let_loops.rs index 6a421da0807da..cb2c8362e1485 100644 --- a/tests/mir-opt/const_prop/while_let_loops.rs +++ b/tests/mir-opt/const_prop/while_let_loops.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR while_let_loops.change_loop_body.GVN.diff pub fn change_loop_body() { diff --git a/tests/mir-opt/copy-prop/borrowed_local.rs b/tests/mir-opt/copy-prop/borrowed_local.rs index 24b8e45532cfd..74ac6281a8953 100644 --- a/tests/mir-opt/copy-prop/borrowed_local.rs +++ b/tests/mir-opt/copy-prop/borrowed_local.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/branch.rs b/tests/mir-opt/copy-prop/branch.rs index 0944bb3d59aa5..fc9b8dc41b166 100644 --- a/tests/mir-opt/copy-prop/branch.rs +++ b/tests/mir-opt/copy-prop/branch.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that we bail out when there are multiple assignments to the same local. -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp fn val() -> i32 { 1 } diff --git a/tests/mir-opt/copy-prop/calls.rs b/tests/mir-opt/copy-prop/calls.rs index 7d123e64950cf..8937c0d2ecb22 100644 --- a/tests/mir-opt/copy-prop/calls.rs +++ b/tests/mir-opt/copy-prop/calls.rs @@ -1,6 +1,6 @@ // skip-filecheck // Check that CopyProp does propagate return values of call terminators. -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp //@ needs-unwind #![feature(custom_mir, core_intrinsics)] diff --git a/tests/mir-opt/copy-prop/copy_propagation_arg.rs b/tests/mir-opt/copy-prop/copy_propagation_arg.rs index 3516d8f7f62fb..e062e1e972887 100644 --- a/tests/mir-opt/copy-prop/copy_propagation_arg.rs +++ b/tests/mir-opt/copy-prop/copy_propagation_arg.rs @@ -2,7 +2,7 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that CopyProp does not propagate an assignment to a function argument // (doing so can break usages of the original argument value) -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp fn dummy(x: u8) -> u8 { x } diff --git a/tests/mir-opt/copy-prop/custom_move_arg.rs b/tests/mir-opt/copy-prop/custom_move_arg.rs index 3577ed2a4a188..a82d4618e68c5 100644 --- a/tests/mir-opt/copy-prop/custom_move_arg.rs +++ b/tests/mir-opt/copy-prop/custom_move_arg.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/cycle.rs b/tests/mir-opt/copy-prop/cycle.rs index ed97e86f83ac0..1c0c9eae7fead 100644 --- a/tests/mir-opt/copy-prop/cycle.rs +++ b/tests/mir-opt/copy-prop/cycle.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code. -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp fn val() -> i32 { 1 } diff --git a/tests/mir-opt/copy-prop/dead_stores_79191.rs b/tests/mir-opt/copy-prop/dead_stores_79191.rs index f6e0eac6c2c9a..24420e19fa80d 100644 --- a/tests/mir-opt/copy-prop/dead_stores_79191.rs +++ b/tests/mir-opt/copy-prop/dead_stores_79191.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp fn id(x: T) -> T { x diff --git a/tests/mir-opt/copy-prop/dead_stores_better.rs b/tests/mir-opt/copy-prop/dead_stores_better.rs index fdf42876909a9..4b18742940160 100644 --- a/tests/mir-opt/copy-prop/dead_stores_better.rs +++ b/tests/mir-opt/copy-prop/dead_stores_better.rs @@ -3,7 +3,7 @@ // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates // that that pass enables this one to do more optimizations. -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp //@ compile-flags: -Zmir-enable-passes=+DeadStoreElimination fn id(x: T) -> T { diff --git a/tests/mir-opt/copy-prop/issue_107511.rs b/tests/mir-opt/copy-prop/issue_107511.rs index d9bd08b1bcf1c..5e8fc8df42e23 100644 --- a/tests/mir-opt/copy-prop/issue_107511.rs +++ b/tests/mir-opt/copy-prop/issue_107511.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp // EMIT_MIR issue_107511.main.CopyProp.diff fn main() { diff --git a/tests/mir-opt/copy-prop/move_arg.rs b/tests/mir-opt/copy-prop/move_arg.rs index 85ced0f6c0d53..498340534324b 100644 --- a/tests/mir-opt/copy-prop/move_arg.rs +++ b/tests/mir-opt/copy-prop/move_arg.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Test that we do not move multiple times from the same local. -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp // EMIT_MIR move_arg.f.CopyProp.diff pub fn f(a: T) { diff --git a/tests/mir-opt/copy-prop/move_projection.rs b/tests/mir-opt/copy-prop/move_projection.rs index d68ffad78bcbc..231e4082e33ba 100644 --- a/tests/mir-opt/copy-prop/move_projection.rs +++ b/tests/mir-opt/copy-prop/move_projection.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/mutate_through_pointer.rs b/tests/mir-opt/copy-prop/mutate_through_pointer.rs index 610f5401084a1..14ca513c69275 100644 --- a/tests/mir-opt/copy-prop/mutate_through_pointer.rs +++ b/tests/mir-opt/copy-prop/mutate_through_pointer.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp // // This attempts to mutate `a` via a pointer derived from `addr_of!(a)`. That is UB // according to Miri. However, the decision to make this UB - and to allow diff --git a/tests/mir-opt/copy-prop/non_dominate.rs b/tests/mir-opt/copy-prop/non_dominate.rs index d8b42b7f96e54..34e7eabc81a2c 100644 --- a/tests/mir-opt/copy-prop/non_dominate.rs +++ b/tests/mir-opt/copy-prop/non_dominate.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/partial_init.rs b/tests/mir-opt/copy-prop/partial_init.rs index 46390556418df..88e94988181d2 100644 --- a/tests/mir-opt/copy-prop/partial_init.rs +++ b/tests/mir-opt/copy-prop/partial_init.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp // Verify that we do not ICE on partial initializations. #![feature(custom_mir, core_intrinsics)] diff --git a/tests/mir-opt/copy-prop/reborrow.rs b/tests/mir-opt/copy-prop/reborrow.rs index 7d02fb328eefc..2f1720556cdee 100644 --- a/tests/mir-opt/copy-prop/reborrow.rs +++ b/tests/mir-opt/copy-prop/reborrow.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that CopyProp considers reborrows as not mutating the pointer. -//@ unit-test: CopyProp +//@ test-mir-pass: CopyProp #![feature(raw_ref_op)] diff --git a/tests/mir-opt/dataflow-const-prop/array_index.rs b/tests/mir-opt/dataflow-const-prop/array_index.rs index df8baf77add42..daf9c7729c604 100644 --- a/tests/mir-opt/dataflow-const-prop/array_index.rs +++ b/tests/mir-opt/dataflow-const-prop/array_index.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR array_index.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs index e2b7dbc096b2f..11faecec6b122 100644 --- a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs +++ b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR boolean_identities.test.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/cast.rs b/tests/mir-opt/dataflow-const-prop/cast.rs index bd6141eedd165..a70cc8ee6a22d 100644 --- a/tests/mir-opt/dataflow-const-prop/cast.rs +++ b/tests/mir-opt/dataflow-const-prop/cast.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR cast.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/checked.rs b/tests/mir-opt/dataflow-const-prop/checked.rs index d3d0938168b6e..a73693464f95b 100644 --- a/tests/mir-opt/dataflow-const-prop/checked.rs +++ b/tests/mir-opt/dataflow-const-prop/checked.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp //@ compile-flags: -Coverflow-checks=on // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs index 617501217cf47..3a0cbac328cb5 100644 --- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs +++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp //@ compile-flags: -Zmir-enable-passes=+GVN,+Inline // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/dataflow-const-prop/enum.rs b/tests/mir-opt/dataflow-const-prop/enum.rs index 82752750eb17f..5c52f92cd8f1f 100644 --- a/tests/mir-opt/dataflow-const-prop/enum.rs +++ b/tests/mir-opt/dataflow-const-prop/enum.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH #![feature(custom_mir, core_intrinsics, rustc_attrs)] diff --git a/tests/mir-opt/dataflow-const-prop/if.rs b/tests/mir-opt/dataflow-const-prop/if.rs index 7df3bb9c42ebc..8cd8b2c2bec14 100644 --- a/tests/mir-opt/dataflow-const-prop/if.rs +++ b/tests/mir-opt/dataflow-const-prop/if.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR if.main.DataflowConstProp.diff // CHECK-LABEL: fn main( diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs index d0063a8e7e499..7ac59befc8ae4 100644 --- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs +++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp //@ compile-flags: -Zmir-enable-passes=+Inline // EMIT_MIR inherit_overflow.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/issue_81605.rs b/tests/mir-opt/dataflow-const-prop/issue_81605.rs index 9231bb22c4ce9..e7960e3fba117 100644 --- a/tests/mir-opt/dataflow-const-prop/issue_81605.rs +++ b/tests/mir-opt/dataflow-const-prop/issue_81605.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR issue_81605.f.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/large_array_index.rs b/tests/mir-opt/dataflow-const-prop/large_array_index.rs index 3a4159ab105f1..e74fd88d002cc 100644 --- a/tests/mir-opt/dataflow-const-prop/large_array_index.rs +++ b/tests/mir-opt/dataflow-const-prop/large_array_index.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs index b15fba29bdf87..3cd0b715a5214 100644 --- a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs +++ b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR mult_by_zero.test.DataflowConstProp.diff // CHECK-LABEL: fn test( diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.rs b/tests/mir-opt/dataflow-const-prop/offset_of.rs index 867890dcf253a..cd4e1f6990dbb 100644 --- a/tests/mir-opt/dataflow-const-prop/offset_of.rs +++ b/tests/mir-opt/dataflow-const-prop/offset_of.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(offset_of_nested)] diff --git a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs index aa669fffd4467..399de921a590f 100644 --- a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs +++ b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp #[inline(never)] fn escape(x: &T) {} diff --git a/tests/mir-opt/dataflow-const-prop/repeat.rs b/tests/mir-opt/dataflow-const-prop/repeat.rs index bebedbb94642f..e32c0d0877dec 100644 --- a/tests/mir-opt/dataflow-const-prop/repeat.rs +++ b/tests/mir-opt/dataflow-const-prop/repeat.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs index ace38364ee3f6..6152724c98f66 100644 --- a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs +++ b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // The struct has scalar ABI, but is not a scalar type. // Make sure that we handle this correctly. diff --git a/tests/mir-opt/dataflow-const-prop/self_assign.rs b/tests/mir-opt/dataflow-const-prop/self_assign.rs index 4171d2991aeaf..f5897bfe37b66 100644 --- a/tests/mir-opt/dataflow-const-prop/self_assign.rs +++ b/tests/mir-opt/dataflow-const-prop/self_assign.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR self_assign.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs index d958025c7077e..11fe3849a1ec9 100644 --- a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs +++ b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR self_assign_add.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs index ad24c5855b8b0..be7f311cdc10d 100644 --- a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs +++ b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs @@ -6,7 +6,7 @@ // used to modify `x.1` - if it did not, then it might incorrectly assume that it // can infer the value of `x.1` at the end of this function. -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR sibling_ptr.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/slice_len.rs b/tests/mir-opt/dataflow-const-prop/slice_len.rs index 08707779e2c80..5d9733f498c91 100644 --- a/tests/mir-opt/dataflow-const-prop/slice_len.rs +++ b/tests/mir-opt/dataflow-const-prop/slice_len.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp //@ compile-flags: -Zmir-enable-passes=+InstSimplify // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/dataflow-const-prop/struct.rs b/tests/mir-opt/dataflow-const-prop/struct.rs index 0180e978a09fb..eed782c9036b2 100644 --- a/tests/mir-opt/dataflow-const-prop/struct.rs +++ b/tests/mir-opt/dataflow-const-prop/struct.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH #[derive(Copy, Clone)] diff --git a/tests/mir-opt/dataflow-const-prop/terminator.rs b/tests/mir-opt/dataflow-const-prop/terminator.rs index d33f3216933ac..aac5d11d3d482 100644 --- a/tests/mir-opt/dataflow-const-prop/terminator.rs +++ b/tests/mir-opt/dataflow-const-prop/terminator.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp fn foo(n: i32) {} diff --git a/tests/mir-opt/dataflow-const-prop/transmute.rs b/tests/mir-opt/dataflow-const-prop/transmute.rs index 7cf0dad5e483d..e7f93f421cf8d 100644 --- a/tests/mir-opt/dataflow-const-prop/transmute.rs +++ b/tests/mir-opt/dataflow-const-prop/transmute.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp //@ compile-flags: -O --crate-type=lib //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/dataflow-const-prop/tuple.rs b/tests/mir-opt/dataflow-const-prop/tuple.rs index 5d7c38970f6c7..d624e21f21ac4 100644 --- a/tests/mir-opt/dataflow-const-prop/tuple.rs +++ b/tests/mir-opt/dataflow-const-prop/tuple.rs @@ -1,4 +1,4 @@ -//@ unit-test: DataflowConstProp +//@ test-mir-pass: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR tuple.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs index 2ce1e9023a764..edb35061cc652 100644 --- a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs +++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DeadStoreElimination-final +//@ test-mir-pass: DeadStoreElimination-final //@ compile-flags: -Zmir-enable-passes=+CopyProp #![feature(core_intrinsics)] diff --git a/tests/mir-opt/dead-store-elimination/cycle.rs b/tests/mir-opt/dead-store-elimination/cycle.rs index ddbc89a7ae2c7..795d57d36f523 100644 --- a/tests/mir-opt/dead-store-elimination/cycle.rs +++ b/tests/mir-opt/dead-store-elimination/cycle.rs @@ -2,7 +2,7 @@ // report that *all* of these stores are live. // //@ needs-unwind -//@ unit-test: DeadStoreElimination-initial +//@ test-mir-pass: DeadStoreElimination-initial #![feature(core_intrinsics, custom_mir)] use std::intrinsics::mir::*; diff --git a/tests/mir-opt/dead-store-elimination/place_mention.rs b/tests/mir-opt/dead-store-elimination/place_mention.rs index d276f6fa0259a..5e4a286a20874 100644 --- a/tests/mir-opt/dead-store-elimination/place_mention.rs +++ b/tests/mir-opt/dead-store-elimination/place_mention.rs @@ -1,7 +1,7 @@ // Verify that we account for the `PlaceMention` statement as a use of the tuple, // and don't remove it as a dead store. // -//@ unit-test: DeadStoreElimination-initial +//@ test-mir-pass: DeadStoreElimination-initial //@ compile-flags: -Zmir-keep-place-mention // EMIT_MIR place_mention.main.DeadStoreElimination-initial.diff diff --git a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs index 20517a00489a5..b2523684a09e6 100644 --- a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs +++ b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs @@ -1,5 +1,5 @@ // Test that we don't remove pointer to int casts or retags -//@ unit-test: DeadStoreElimination-initial +//@ test-mir-pass: DeadStoreElimination-initial //@ compile-flags: -Zmir-emit-retag // EMIT_MIR provenance_soundness.pointer_to_int.DeadStoreElimination-initial.diff diff --git a/tests/mir-opt/deduplicate_blocks.rs b/tests/mir-opt/deduplicate_blocks.rs index 7979fdfe768c7..3a164cb09a094 100644 --- a/tests/mir-opt/deduplicate_blocks.rs +++ b/tests/mir-opt/deduplicate_blocks.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DeduplicateBlocks +//@ test-mir-pass: DeduplicateBlocks // EMIT_MIR deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff pub const fn is_line_doc_comment_2(s: &str) -> bool { diff --git a/tests/mir-opt/derefer_complex_case.rs b/tests/mir-opt/derefer_complex_case.rs index bdaf83fcb5bf8..b1fa2c8733ef7 100644 --- a/tests/mir-opt/derefer_complex_case.rs +++ b/tests/mir-opt/derefer_complex_case.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: Derefer +//@ test-mir-pass: Derefer // EMIT_MIR derefer_complex_case.main.Derefer.diff // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/derefer_inline_test.rs b/tests/mir-opt/derefer_inline_test.rs index 89de514a28080..7f9272bdec852 100644 --- a/tests/mir-opt/derefer_inline_test.rs +++ b/tests/mir-opt/derefer_inline_test.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: Derefer +//@ test-mir-pass: Derefer // EMIT_MIR derefer_inline_test.main.Derefer.diff // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/derefer_terminator_test.rs b/tests/mir-opt/derefer_terminator_test.rs index e225db5bbe8a4..5de6a61eaf2c6 100644 --- a/tests/mir-opt/derefer_terminator_test.rs +++ b/tests/mir-opt/derefer_terminator_test.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: Derefer +//@ test-mir-pass: Derefer // EMIT_MIR derefer_terminator_test.main.Derefer.diff // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/derefer_test.rs b/tests/mir-opt/derefer_test.rs index e30a286805fee..3ca2144e4fc43 100644 --- a/tests/mir-opt/derefer_test.rs +++ b/tests/mir-opt/derefer_test.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: Derefer +//@ test-mir-pass: Derefer // EMIT_MIR derefer_test.main.Derefer.diff fn main() { let mut a = (42,43); diff --git a/tests/mir-opt/derefer_test_multiple.rs b/tests/mir-opt/derefer_test_multiple.rs index 4efc735b22ebc..145a19ee6a3cd 100644 --- a/tests/mir-opt/derefer_test_multiple.rs +++ b/tests/mir-opt/derefer_test_multiple.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: Derefer +//@ test-mir-pass: Derefer // EMIT_MIR derefer_test_multiple.main.Derefer.diff fn main () { let mut a = (42, 43); diff --git a/tests/mir-opt/dest-prop/branch.rs b/tests/mir-opt/dest-prop/branch.rs index cd55130728570..481d4130c7b59 100644 --- a/tests/mir-opt/dest-prop/branch.rs +++ b/tests/mir-opt/dest-prop/branch.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that assignment in both branches of an `if` are eliminated. -//@ unit-test: DestinationPropagation +//@ test-mir-pass: DestinationPropagation fn val() -> i32 { 1 } diff --git a/tests/mir-opt/dest-prop/copy_propagation_arg.rs b/tests/mir-opt/dest-prop/copy_propagation_arg.rs index f84b5fde8d88b..db4969924ffb9 100644 --- a/tests/mir-opt/dest-prop/copy_propagation_arg.rs +++ b/tests/mir-opt/dest-prop/copy_propagation_arg.rs @@ -2,7 +2,7 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that DestinationPropagation does not propagate an assignment to a function argument // (doing so can break usages of the original argument value) -//@ unit-test: DestinationPropagation +//@ test-mir-pass: DestinationPropagation fn dummy(x: u8) -> u8 { x } diff --git a/tests/mir-opt/dest-prop/cycle.rs b/tests/mir-opt/dest-prop/cycle.rs index e6663956d7822..e414daf20f2dd 100644 --- a/tests/mir-opt/dest-prop/cycle.rs +++ b/tests/mir-opt/dest-prop/cycle.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code. -//@ unit-test: DestinationPropagation +//@ test-mir-pass: DestinationPropagation fn val() -> i32 { 1 } diff --git a/tests/mir-opt/dest-prop/dead_stores_79191.rs b/tests/mir-opt/dest-prop/dead_stores_79191.rs index b3e370966d05d..5c218a328f584 100644 --- a/tests/mir-opt/dest-prop/dead_stores_79191.rs +++ b/tests/mir-opt/dest-prop/dead_stores_79191.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: DestinationPropagation +//@ test-mir-pass: DestinationPropagation fn id(x: T) -> T { x diff --git a/tests/mir-opt/dest-prop/dead_stores_better.rs b/tests/mir-opt/dest-prop/dead_stores_better.rs index c241d71594bab..06445dc87031e 100644 --- a/tests/mir-opt/dest-prop/dead_stores_better.rs +++ b/tests/mir-opt/dest-prop/dead_stores_better.rs @@ -3,7 +3,7 @@ // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates // that that pass enables this one to do more optimizations. -//@ unit-test: DestinationPropagation +//@ test-mir-pass: DestinationPropagation //@ compile-flags: -Zmir-enable-passes=+DeadStoreElimination fn id(x: T) -> T { diff --git a/tests/mir-opt/dest-prop/simple.rs b/tests/mir-opt/dest-prop/simple.rs index 4aa6b6a4876e4..8e5d6340e566f 100644 --- a/tests/mir-opt/dest-prop/simple.rs +++ b/tests/mir-opt/dest-prop/simple.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too. -//@ unit-test: DestinationPropagation +//@ test-mir-pass: DestinationPropagation // EMIT_MIR simple.nrvo.DestinationPropagation.diff fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] { let mut buf = [0; 1024]; diff --git a/tests/mir-opt/dont_inline_type_id.rs b/tests/mir-opt/dont_inline_type_id.rs index ae72eb11735e9..ab748940ac43a 100644 --- a/tests/mir-opt/dont_inline_type_id.rs +++ b/tests/mir-opt/dont_inline_type_id.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: Inline +//@ test-mir-pass: Inline //@ compile-flags: --crate-type=lib -C panic=abort use std::any::Any; diff --git a/tests/mir-opt/early_otherwise_branch.rs b/tests/mir-opt/early_otherwise_branch.rs index bfeb1f7bbc61b..b047c50df97fa 100644 --- a/tests/mir-opt/early_otherwise_branch.rs +++ b/tests/mir-opt/early_otherwise_branch.rs @@ -1,4 +1,4 @@ -//@ unit-test: EarlyOtherwiseBranch +//@ test-mir-pass: EarlyOtherwiseBranch //@ compile-flags: -Zmir-enable-passes=+UnreachableEnumBranching enum Option2 { diff --git a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs index 2d215621bbd98..d2a3e1f59ff6e 100644 --- a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs +++ b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs @@ -1,4 +1,4 @@ -//@ unit-test: EarlyOtherwiseBranch +//@ test-mir-pass: EarlyOtherwiseBranch //@ compile-flags: -Zmir-enable-passes=+UnreachableEnumBranching enum Option2 { diff --git a/tests/mir-opt/early_otherwise_branch_68867.rs b/tests/mir-opt/early_otherwise_branch_68867.rs index 59bc19ceeccc3..789b5ebab807d 100644 --- a/tests/mir-opt/early_otherwise_branch_68867.rs +++ b/tests/mir-opt/early_otherwise_branch_68867.rs @@ -1,4 +1,4 @@ -//@ unit-test: EarlyOtherwiseBranch +//@ test-mir-pass: EarlyOtherwiseBranch //@ compile-flags: -Zmir-enable-passes=+UnreachableEnumBranching // FIXME: This test was broken by the derefer change. diff --git a/tests/mir-opt/early_otherwise_branch_noopt.rs b/tests/mir-opt/early_otherwise_branch_noopt.rs index 6b48393e6b947..307c6e579c99e 100644 --- a/tests/mir-opt/early_otherwise_branch_noopt.rs +++ b/tests/mir-opt/early_otherwise_branch_noopt.rs @@ -1,4 +1,4 @@ -//@ unit-test: EarlyOtherwiseBranch +//@ test-mir-pass: EarlyOtherwiseBranch //@ compile-flags: -Zmir-enable-passes=+UnreachableEnumBranching // must not optimize as it does not follow the pattern of diff --git a/tests/mir-opt/early_otherwise_branch_soundness.rs b/tests/mir-opt/early_otherwise_branch_soundness.rs index 74a2af884c0b6..a22be312a9b92 100644 --- a/tests/mir-opt/early_otherwise_branch_soundness.rs +++ b/tests/mir-opt/early_otherwise_branch_soundness.rs @@ -1,4 +1,4 @@ -//@ unit-test: EarlyOtherwiseBranch +//@ test-mir-pass: EarlyOtherwiseBranch //@ compile-flags: -Zmir-enable-passes=+UnreachableEnumBranching // Tests various cases that the `early_otherwise_branch` opt should *not* optimize diff --git a/tests/mir-opt/enum_opt.rs b/tests/mir-opt/enum_opt.rs index c5b3e61a4cb25..cacc7301f1220 100644 --- a/tests/mir-opt/enum_opt.rs +++ b/tests/mir-opt/enum_opt.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: EnumSizeOpt +//@ test-mir-pass: EnumSizeOpt // EMIT_MIR_FOR_EACH_BIT_WIDTH //@ compile-flags: -Zunsound-mir-opts diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs index 6f4d1e35585bc..0484710f00e7e 100644 --- a/tests/mir-opt/gvn.rs +++ b/tests/mir-opt/gvn.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //@ only-64bit diff --git a/tests/mir-opt/gvn_copy_moves.rs b/tests/mir-opt/gvn_copy_moves.rs index 9d83a19e4a583..1812de16d69fd 100644 --- a/tests/mir-opt/gvn_copy_moves.rs +++ b/tests/mir-opt/gvn_copy_moves.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/gvn_uninhabited.rs b/tests/mir-opt/gvn_uninhabited.rs index 5f9df7953c8e5..015949c5d20b9 100644 --- a/tests/mir-opt/gvn_uninhabited.rs +++ b/tests/mir-opt/gvn_uninhabited.rs @@ -1,4 +1,4 @@ -//@ unit-test: GVN +//@ test-mir-pass: GVN //@ compile-flags: -O // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // skip-filecheck diff --git a/tests/mir-opt/if_condition_int.rs b/tests/mir-opt/if_condition_int.rs index 2f3f643304569..4cc2c2b902102 100644 --- a/tests/mir-opt/if_condition_int.rs +++ b/tests/mir-opt/if_condition_int.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: SimplifyComparisonIntegral +//@ test-mir-pass: SimplifyComparisonIntegral // EMIT_MIR if_condition_int.opt_u32.SimplifyComparisonIntegral.diff // EMIT_MIR if_condition_int.opt_negative.SimplifyComparisonIntegral.diff // EMIT_MIR if_condition_int.opt_char.SimplifyComparisonIntegral.diff diff --git a/tests/mir-opt/inline/indirect_destination.rs b/tests/mir-opt/inline/indirect_destination.rs index 337f617e70364..4246eef08f704 100644 --- a/tests/mir-opt/inline/indirect_destination.rs +++ b/tests/mir-opt/inline/indirect_destination.rs @@ -1,6 +1,6 @@ // Test for inlining with an indirect destination place. // -//@ unit-test: Inline +//@ test-mir-pass: Inline //@ edition: 2021 //@ needs-unwind #![crate_type = "lib"] diff --git a/tests/mir-opt/inline/inline_box_fn.rs b/tests/mir-opt/inline/inline_box_fn.rs index 3e006016f8c30..bb2da3ac51576 100644 --- a/tests/mir-opt/inline/inline_box_fn.rs +++ b/tests/mir-opt/inline/inline_box_fn.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: Inline +//@ test-mir-pass: Inline //@ compile-flags: --crate-type=lib // EMIT_MIR inline_box_fn.call.Inline.diff diff --git a/tests/mir-opt/inline/unit_test.rs b/tests/mir-opt/inline/unit_test.rs index f6c3d6a58de00..bebe69384612e 100644 --- a/tests/mir-opt/inline/unit_test.rs +++ b/tests/mir-opt/inline/unit_test.rs @@ -1,5 +1,5 @@ // Check that `-Zmir-enable-passes=+Inline` does not ICE because of stolen MIR. -//@ unit-test: Inline +//@ test-mir-pass: Inline // skip-filecheck #![crate_type = "lib"] diff --git a/tests/mir-opt/inline_coroutine_body.rs b/tests/mir-opt/inline_coroutine_body.rs index be73bc49de59e..4326ff8a11b39 100644 --- a/tests/mir-opt/inline_coroutine_body.rs +++ b/tests/mir-opt/inline_coroutine_body.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // skip-filecheck -//@ unit-test: Inline +//@ test-mir-pass: Inline //@ edition: 2021 //@ compile-flags: -Zinline-mir-hint-threshold=10000 -Zinline-mir-threshold=10000 --crate-type=lib diff --git a/tests/mir-opt/inline_generically_if_sized.rs b/tests/mir-opt/inline_generically_if_sized.rs index 794ce3dabbca3..e4fc94ec43626 100644 --- a/tests/mir-opt/inline_generically_if_sized.rs +++ b/tests/mir-opt/inline_generically_if_sized.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: Inline +//@ test-mir-pass: Inline //@ compile-flags: --crate-type=lib -C panic=abort trait Foo { diff --git a/tests/mir-opt/instrument_coverage.rs b/tests/mir-opt/instrument_coverage.rs index ae63990f253df..beb88b607f974 100644 --- a/tests/mir-opt/instrument_coverage.rs +++ b/tests/mir-opt/instrument_coverage.rs @@ -2,7 +2,7 @@ // The Coverage::CounterIncrement statements are later converted into LLVM // instrprof.increment intrinsics, during codegen. -//@ unit-test: InstrumentCoverage +//@ test-mir-pass: InstrumentCoverage //@ compile-flags: -Cinstrument-coverage -Zno-profiler-runtime // EMIT_MIR instrument_coverage.main.InstrumentCoverage.diff diff --git a/tests/mir-opt/instrument_coverage_cleanup.rs b/tests/mir-opt/instrument_coverage_cleanup.rs index 7db76339e551d..acc544a28af65 100644 --- a/tests/mir-opt/instrument_coverage_cleanup.rs +++ b/tests/mir-opt/instrument_coverage_cleanup.rs @@ -5,7 +5,7 @@ // Removed statement kinds: BlockMarker, SpanMarker // Retained statement kinds: CounterIncrement, ExpressionUsed -//@ unit-test: InstrumentCoverage +//@ test-mir-pass: InstrumentCoverage //@ compile-flags: -Cinstrument-coverage -Zcoverage-options=branch -Zno-profiler-runtime // EMIT_MIR instrument_coverage_cleanup.main.InstrumentCoverage.diff diff --git a/tests/mir-opt/instsimplify/bool_compare.rs b/tests/mir-opt/instsimplify/bool_compare.rs index 47984edd669f0..d1d903f9ef2cf 100644 --- a/tests/mir-opt/instsimplify/bool_compare.rs +++ b/tests/mir-opt/instsimplify/bool_compare.rs @@ -1,4 +1,4 @@ -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify // EMIT_MIR bool_compare.eq_true.InstSimplify.diff fn eq_true(x: bool) -> u32 { diff --git a/tests/mir-opt/instsimplify/casts.rs b/tests/mir-opt/instsimplify/casts.rs index adcf325e3f5c2..b3bc34af5b707 100644 --- a/tests/mir-opt/instsimplify/casts.rs +++ b/tests/mir-opt/instsimplify/casts.rs @@ -1,4 +1,4 @@ -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify //@ compile-flags: -Zinline-mir #![crate_type = "lib"] diff --git a/tests/mir-opt/instsimplify/combine_array_len.rs b/tests/mir-opt/instsimplify/combine_array_len.rs index 4b4054a7a2d6b..86455e8b52d55 100644 --- a/tests/mir-opt/instsimplify/combine_array_len.rs +++ b/tests/mir-opt/instsimplify/combine_array_len.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify // EMIT_MIR combine_array_len.norm2.InstSimplify.diff fn norm2(x: [f32; 2]) -> f32 { diff --git a/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs index d0c85595dbcf8..7b1f3d14f4fd9 100644 --- a/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs +++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs @@ -1,4 +1,4 @@ -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff diff --git a/tests/mir-opt/instsimplify/combine_transmutes.rs b/tests/mir-opt/instsimplify/combine_transmutes.rs index 3707ee17690da..a1274dd1b4086 100644 --- a/tests/mir-opt/instsimplify/combine_transmutes.rs +++ b/tests/mir-opt/instsimplify/combine_transmutes.rs @@ -1,4 +1,4 @@ -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify //@ compile-flags: -C panic=abort #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/mir-opt/instsimplify/duplicate_switch_targets.rs b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs index fd09d632a4f04..454728249b1a4 100644 --- a/tests/mir-opt/instsimplify/duplicate_switch_targets.rs +++ b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs @@ -1,4 +1,4 @@ -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify #![feature(custom_mir, core_intrinsics)] #![crate_type = "lib"] diff --git a/tests/mir-opt/instsimplify/intrinsic_asserts.rs b/tests/mir-opt/instsimplify/intrinsic_asserts.rs index c14b1ac5a218e..c031c97816261 100644 --- a/tests/mir-opt/instsimplify/intrinsic_asserts.rs +++ b/tests/mir-opt/instsimplify/intrinsic_asserts.rs @@ -1,4 +1,4 @@ -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/mir-opt/instsimplify/ub_check.rs b/tests/mir-opt/instsimplify/ub_check.rs index fc568abcd601c..5f13f5ba059b5 100644 --- a/tests/mir-opt/instsimplify/ub_check.rs +++ b/tests/mir-opt/instsimplify/ub_check.rs @@ -1,4 +1,4 @@ -//@ unit-test: InstSimplify +//@ test-mir-pass: InstSimplify //@ compile-flags: -Cdebug-assertions=no -Zinline-mir // EMIT_MIR ub_check.unwrap_unchecked.InstSimplify.diff diff --git a/tests/mir-opt/issue_101973.rs b/tests/mir-opt/issue_101973.rs index c40eaa1f2a9b8..84a36f1374e8e 100644 --- a/tests/mir-opt/issue_101973.rs +++ b/tests/mir-opt/issue_101973.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //@ compile-flags: -O -C debug-assertions=on -// This needs inlining followed by GVN to reproduce, so we cannot use "unit-test". +// This needs inlining followed by GVN to reproduce, so we cannot use "test-mir-pass". #[inline] pub fn imm8(x: u32) -> u32 { diff --git a/tests/mir-opt/jump_threading.rs b/tests/mir-opt/jump_threading.rs index eedb26ad41a53..57f4e4a2654f7 100644 --- a/tests/mir-opt/jump_threading.rs +++ b/tests/mir-opt/jump_threading.rs @@ -1,4 +1,4 @@ -//@ unit-test: JumpThreading +//@ test-mir-pass: JumpThreading //@ compile-flags: -Zmir-enable-passes=+Inline // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/lower_array_len.rs b/tests/mir-opt/lower_array_len.rs index 7fcea75aaaf43..1c30c4c89b966 100644 --- a/tests/mir-opt/lower_array_len.rs +++ b/tests/mir-opt/lower_array_len.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: NormalizeArrayLen +//@ test-mir-pass: NormalizeArrayLen //@ compile-flags: -Zmir-enable-passes=+LowerSliceLenCalls // EMIT_MIR lower_array_len.array_bound.NormalizeArrayLen.diff diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs index 08366417d7cb4..693425c004152 100644 --- a/tests/mir-opt/lower_intrinsics.rs +++ b/tests/mir-opt/lower_intrinsics.rs @@ -1,4 +1,4 @@ -//@ unit-test: LowerIntrinsics +//@ test-mir-pass: LowerIntrinsics // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(core_intrinsics, intrinsics, rustc_attrs)] diff --git a/tests/mir-opt/lower_slice_len.rs b/tests/mir-opt/lower_slice_len.rs index 38d5e984cee7e..b82094dc18f9c 100644 --- a/tests/mir-opt/lower_slice_len.rs +++ b/tests/mir-opt/lower_slice_len.rs @@ -1,4 +1,4 @@ -//@ unit-test: LowerSliceLenCalls +//@ test-mir-pass: LowerSliceLenCalls // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR lower_slice_len.bound.LowerSliceLenCalls.diff diff --git a/tests/mir-opt/matches_reduce_branches.rs b/tests/mir-opt/matches_reduce_branches.rs index 2e7b7d4e6001a..fa466220b6537 100644 --- a/tests/mir-opt/matches_reduce_branches.rs +++ b/tests/mir-opt/matches_reduce_branches.rs @@ -1,4 +1,4 @@ -//@ unit-test: MatchBranchSimplification +//@ test-mir-pass: MatchBranchSimplification #![feature(repr128)] #![feature(core_intrinsics)] diff --git a/tests/mir-opt/matches_u8.rs b/tests/mir-opt/matches_u8.rs index e855c913226a4..f0be82d025713 100644 --- a/tests/mir-opt/matches_u8.rs +++ b/tests/mir-opt/matches_u8.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: MatchBranchSimplification +//@ test-mir-pass: MatchBranchSimplification // EMIT_MIR matches_u8.exhaustive_match.MatchBranchSimplification.diff diff --git a/tests/mir-opt/nrvo_miscompile_111005.rs b/tests/mir-opt/nrvo_miscompile_111005.rs index 3087c98d0528d..18814b0678fe4 100644 --- a/tests/mir-opt/nrvo_miscompile_111005.rs +++ b/tests/mir-opt/nrvo_miscompile_111005.rs @@ -1,7 +1,7 @@ // skip-filecheck // This is a miscompilation, #111005 to track -//@ unit-test: RenameReturnPlace +//@ test-mir-pass: RenameReturnPlace #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/nrvo_simple.rs b/tests/mir-opt/nrvo_simple.rs index adb787a09fb66..5d2894a704a54 100644 --- a/tests/mir-opt/nrvo_simple.rs +++ b/tests/mir-opt/nrvo_simple.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: RenameReturnPlace +//@ test-mir-pass: RenameReturnPlace // EMIT_MIR nrvo_simple.nrvo.RenameReturnPlace.diff fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] { diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs index 70587dff0b540..2dda771ba7d74 100644 --- a/tests/mir-opt/reference_prop.rs +++ b/tests/mir-opt/reference_prop.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zlint-mir=no -//@ unit-test: ReferencePropagation +//@ test-mir-pass: ReferencePropagation //@ needs-unwind #![feature(raw_ref_op)] diff --git a/tests/mir-opt/remove_storage_markers.rs b/tests/mir-opt/remove_storage_markers.rs index c53c387504527..4a928b7745272 100644 --- a/tests/mir-opt/remove_storage_markers.rs +++ b/tests/mir-opt/remove_storage_markers.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: RemoveStorageMarkers +//@ test-mir-pass: RemoveStorageMarkers // Checks that storage markers are removed at opt-level=0. // diff --git a/tests/mir-opt/retag.rs b/tests/mir-opt/retag.rs index 17b3c10abeb18..43d74aa5726fa 100644 --- a/tests/mir-opt/retag.rs +++ b/tests/mir-opt/retag.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: AddRetag +//@ test-mir-pass: AddRetag // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // ignore-tidy-linelength //@ compile-flags: -Z mir-emit-retag -Z mir-opt-level=0 -Z span_free_formats diff --git a/tests/mir-opt/set_no_discriminant.rs b/tests/mir-opt/set_no_discriminant.rs index 995bd11a1a927..0c29d1faf02a7 100644 --- a/tests/mir-opt/set_no_discriminant.rs +++ b/tests/mir-opt/set_no_discriminant.rs @@ -1,6 +1,6 @@ // `SetDiscriminant` does not actually write anything if the chosen variant is the untagged variant // of a niche encoding. Verify that we do not thread over this case. -//@ unit-test: JumpThreading +//@ test-mir-pass: JumpThreading #![feature(custom_mir)] #![feature(core_intrinsics)] diff --git a/tests/mir-opt/simplify_dead_blocks.rs b/tests/mir-opt/simplify_dead_blocks.rs index d4de85622d41e..686eac5823640 100644 --- a/tests/mir-opt/simplify_dead_blocks.rs +++ b/tests/mir-opt/simplify_dead_blocks.rs @@ -1,4 +1,4 @@ -//@ unit-test: SimplifyCfg-after-unreachable-enum-branching +//@ test-mir-pass: SimplifyCfg-after-unreachable-enum-branching #![feature(custom_mir, core_intrinsics)] #![crate_type = "lib"] diff --git a/tests/mir-opt/simplify_locals.rs b/tests/mir-opt/simplify_locals.rs index 756679e77e396..f57611111cfcb 100644 --- a/tests/mir-opt/simplify_locals.rs +++ b/tests/mir-opt/simplify_locals.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: SimplifyLocals-before-const-prop +//@ test-mir-pass: SimplifyLocals-before-const-prop #![feature(thread_local)] diff --git a/tests/mir-opt/simplify_locals_removes_unused_consts.rs b/tests/mir-opt/simplify_locals_removes_unused_consts.rs index 3a461647e3624..70d1555e786bc 100644 --- a/tests/mir-opt/simplify_locals_removes_unused_consts.rs +++ b/tests/mir-opt/simplify_locals_removes_unused_consts.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -//@ unit-test: SimplifyLocals-before-const-prop +//@ test-mir-pass: SimplifyLocals-before-const-prop //@ compile-flags: -C overflow-checks=no fn use_zst(_: ((), ())) {} diff --git a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs index 52afb4f2c5276..6257f5ee795ac 100644 --- a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs +++ b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs @@ -1,5 +1,5 @@ // skip-filecheck -//@ unit-test: SimplifyLocals-before-const-prop +//@ test-mir-pass: SimplifyLocals-before-const-prop fn map(x: Option>) -> Option> { match x { diff --git a/tests/mir-opt/sroa/lifetimes.rs b/tests/mir-opt/sroa/lifetimes.rs index 3f5c99404d86e..6c18dbaf5a23b 100644 --- a/tests/mir-opt/sroa/lifetimes.rs +++ b/tests/mir-opt/sroa/lifetimes.rs @@ -1,4 +1,4 @@ -//@ unit-test: ScalarReplacementOfAggregates +//@ test-mir-pass: ScalarReplacementOfAggregates //@ compile-flags: -Cpanic=abort //@ no-prefer-dynamic diff --git a/tests/mir-opt/sroa/structs.rs b/tests/mir-opt/sroa/structs.rs index cbe4b98953039..a177dbf71cf1c 100644 --- a/tests/mir-opt/sroa/structs.rs +++ b/tests/mir-opt/sroa/structs.rs @@ -1,4 +1,4 @@ -//@ unit-test: ScalarReplacementOfAggregates +//@ test-mir-pass: ScalarReplacementOfAggregates //@ compile-flags: -Cpanic=abort //@ no-prefer-dynamic diff --git a/tests/mir-opt/unreachable.rs b/tests/mir-opt/unreachable.rs index b07b8230faf3e..5838b35a553a4 100644 --- a/tests/mir-opt/unreachable.rs +++ b/tests/mir-opt/unreachable.rs @@ -1,4 +1,4 @@ -//@ unit-test: UnreachablePropagation +//@ test-mir-pass: UnreachablePropagation // EMIT_MIR_FOR_EACH_PANIC_STRATEGY enum Empty {} diff --git a/tests/mir-opt/unreachable_diverging.rs b/tests/mir-opt/unreachable_diverging.rs index b7e0f6eff9bf7..695e3c4e8fc86 100644 --- a/tests/mir-opt/unreachable_diverging.rs +++ b/tests/mir-opt/unreachable_diverging.rs @@ -1,4 +1,4 @@ -//@ unit-test: UnreachablePropagation +//@ test-mir-pass: UnreachablePropagation // EMIT_MIR_FOR_EACH_PANIC_STRATEGY pub enum Empty {} diff --git a/tests/mir-opt/unreachable_enum_branching.rs b/tests/mir-opt/unreachable_enum_branching.rs index 156b23657b7a6..6005dc546dc8b 100644 --- a/tests/mir-opt/unreachable_enum_branching.rs +++ b/tests/mir-opt/unreachable_enum_branching.rs @@ -1,4 +1,4 @@ -//@ unit-test: UnreachableEnumBranching +//@ test-mir-pass: UnreachableEnumBranching // EMIT_MIR_FOR_EACH_PANIC_STRATEGY enum Empty {}