From eb6eed4ba7287aa525273d8b4a385d4d02872504 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Tue, 21 Apr 2026 22:30:43 +1000 Subject: [PATCH] Make `//@ skip-filecheck` a normal compiletest directive --- src/doc/rustc-dev-guide/src/tests/directives.md | 2 ++ src/tools/compiletest/src/directives.rs | 4 ++++ .../compiletest/src/directives/directive_names.rs | 1 + src/tools/compiletest/src/directives/handlers.rs | 14 +++++++++++++- src/tools/compiletest/src/runtest/mir_opt.rs | 4 ++-- src/tools/miropt-test-tools/src/lib.rs | 14 ++++++-------- tests/mir-opt/README.md | 2 +- tests/mir-opt/address_of.rs | 2 +- .../mir-opt/async_closure_fake_read_for_by_move.rs | 2 +- tests/mir-opt/async_closure_shims.rs | 2 +- tests/mir-opt/async_drop_live_dead.rs | 2 +- tests/mir-opt/async_drop_mir_pin.rs | 2 +- tests/mir-opt/box_conditional_drop_allocator.rs | 2 +- tests/mir-opt/build_correct_coerce.rs | 2 +- tests/mir-opt/building/async_await.rs | 2 +- tests/mir-opt/building/coroutine.rs | 2 +- tests/mir-opt/building/custom/aggregate_exprs.rs | 2 +- tests/mir-opt/building/custom/arbitrary_let.rs | 2 +- tests/mir-opt/building/custom/arrays.rs | 2 +- tests/mir-opt/building/custom/as_cast.rs | 2 +- tests/mir-opt/building/custom/assume.rs | 2 +- tests/mir-opt/building/custom/composite_return.rs | 2 +- tests/mir-opt/building/custom/consts.rs | 2 +- tests/mir-opt/building/custom/enums.rs | 2 +- tests/mir-opt/building/custom/operators.rs | 2 +- tests/mir-opt/building/custom/projections.rs | 2 +- tests/mir-opt/building/custom/references.rs | 2 +- tests/mir-opt/building/custom/simple_assign.rs | 2 +- tests/mir-opt/building/custom/terminators.rs | 2 +- tests/mir-opt/building/enum_cast.rs | 2 +- tests/mir-opt/building/eq_never_type.rs | 2 +- tests/mir-opt/building/issue_101867.rs | 2 +- tests/mir-opt/building/issue_110508.rs | 2 +- tests/mir-opt/building/issue_49232.rs | 2 +- .../mir-opt/building/logical_or_in_conditional.rs | 2 +- tests/mir-opt/building/loop_match_diverges.rs | 2 +- .../building/match/deref-patterns/string.rs | 2 +- tests/mir-opt/building/match/exponential_or.rs | 2 +- tests/mir-opt/building/match/match_false_edges.rs | 2 +- tests/mir-opt/building/match/simple_match.rs | 2 +- tests/mir-opt/building/receiver_ptr_mutability.rs | 2 +- tests/mir-opt/building/shifts.rs | 2 +- .../building/storage_live_dead_in_statics.rs | 2 +- tests/mir-opt/building/uniform_array_move_out.rs | 2 +- tests/mir-opt/building/user_type_annotations.rs | 2 +- tests/mir-opt/byte_slice.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_goto_const_eval_fail.rs | 2 +- tests/mir-opt/const_promotion_extern_static.rs | 2 +- tests/mir-opt/const_prop/invalid_constant.rs | 2 +- tests/mir-opt/const_prop/large_array_index.rs | 2 +- tests/mir-opt/const_prop/offset_of.rs | 2 +- tests/mir-opt/coroutine_drop_cleanup.rs | 2 +- tests/mir-opt/coroutine_storage_dead_unwind.rs | 2 +- tests/mir-opt/coroutine_tiny.rs | 2 +- tests/mir-opt/coverage/branch_match_arms.rs | 2 +- tests/mir-opt/dataflow.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/nrvo_borrowed.rs | 2 +- tests/mir-opt/dont_inline_type_id.rs | 2 +- tests/mir-opt/elaborate_box_deref_in_debuginfo.rs | 2 +- tests/mir-opt/enum_opt.rs | 2 +- tests/mir-opt/fn_ptr_shim.rs | 2 +- tests/mir-opt/funky_arms.rs | 2 +- tests/mir-opt/global_asm.rs | 2 +- tests/mir-opt/graphviz.rs | 2 +- tests/mir-opt/gvn_on_unsafe_binder.rs | 2 +- tests/mir-opt/gvn_ptr_eq_with_constant.rs | 2 +- tests/mir-opt/gvn_uninhabited.rs | 2 +- tests/mir-opt/impossible_predicates.rs | 2 +- tests/mir-opt/inline/inline_async.rs | 2 +- tests/mir-opt/inline/inline_cycle.rs | 2 +- tests/mir-opt/inline/inline_cycle_generic.rs | 2 +- tests/mir-opt/inline/polymorphic_recursion.rs | 2 +- .../recursion_limit_prevents_cycle_discovery.rs | 2 +- tests/mir-opt/inline/type_overflow.rs | 2 +- tests/mir-opt/inline/unit_test.rs | 2 +- tests/mir-opt/inline_coroutine_body.rs | 2 +- tests/mir-opt/inline_default_trait_body.rs | 2 +- tests/mir-opt/inline_double_cycle.rs | 2 +- tests/mir-opt/inline_generically_if_sized.rs | 2 +- tests/mir-opt/issue_101973.rs | 2 +- .../mir-opt/issue_104451_unwindable_intrinsics.rs | 2 +- tests/mir-opt/issue_120925_unsafefncast.rs | 2 +- tests/mir-opt/issue_38669.rs | 2 +- tests/mir-opt/issue_41110.rs | 2 +- tests/mir-opt/issue_41697.rs | 2 +- tests/mir-opt/issue_41888.rs | 2 +- tests/mir-opt/issue_62289.rs | 2 +- tests/mir-opt/issue_72181.rs | 2 +- tests/mir-opt/issue_72181_1.rs | 2 +- tests/mir-opt/issue_76432.rs | 2 +- tests/mir-opt/issue_78192.rs | 2 +- tests/mir-opt/issue_91633.rs | 2 +- tests/mir-opt/issue_99325.rs | 2 +- tests/mir-opt/loop_test.rs | 2 +- tests/mir-opt/match_arm_scopes.rs | 2 +- tests/mir-opt/matches_u8.rs | 2 +- tests/mir-opt/multiple_return_terminators.rs | 2 +- tests/mir-opt/nll/named_lifetimes_basic.rs | 2 +- tests/mir-opt/nll/region_subtyping_basic.rs | 2 +- tests/mir-opt/no_drop_for_inactive_variant.rs | 2 +- tests/mir-opt/no_spurious_drop_after_call.rs | 2 +- tests/mir-opt/or_pattern.rs | 2 +- tests/mir-opt/packed_struct_drop_aligned.rs | 2 +- tests/mir-opt/pre-codegen/chained_comparison.rs | 2 +- .../pre-codegen/duplicate_switch_targets.rs | 2 +- tests/mir-opt/pre-codegen/intrinsics.rs | 2 +- tests/mir-opt/pre-codegen/loops.rs | 2 +- tests/mir-opt/pre-codegen/mem_replace.rs | 2 +- .../mir-opt/pre-codegen/optimizes_into_variable.rs | 2 +- tests/mir-opt/pre-codegen/ptr_offset.rs | 2 +- tests/mir-opt/pre-codegen/range_iter.rs | 2 +- tests/mir-opt/pre-codegen/slice_filter.rs | 2 +- tests/mir-opt/pre-codegen/slice_iter.rs | 2 +- tests/mir-opt/pre-codegen/spans.rs | 2 +- tests/mir-opt/pre-codegen/try_identity.rs | 2 +- tests/mir-opt/pre-codegen/vec_deref.rs | 2 +- tests/mir-opt/remove_fake_borrows.rs | 2 +- tests/mir-opt/remove_never_const.rs | 2 +- tests/mir-opt/retag.rs | 2 +- tests/mir-opt/return_an_array.rs | 2 +- tests/mir-opt/separate_const_switch.rs | 2 +- tests/mir-opt/simplify_cfg.rs | 2 +- tests/mir-opt/simplify_locals.rs | 2 +- .../simplify_locals_removes_unused_consts.rs | 2 +- ...ify_locals_removes_unused_discriminant_reads.rs | 2 +- tests/mir-opt/slice_drop_shim.rs | 2 +- tests/mir-opt/ssa_unreachable_116212.rs | 2 +- tests/mir-opt/storage_ranges.rs | 2 +- tests/mir-opt/switch_to_self.rs | 2 +- tests/mir-opt/tail_call_drops.rs | 2 +- tests/mir-opt/tail_expr_drop_order_unwind.rs | 2 +- tests/mir-opt/tls_access.rs | 2 +- tests/mir-opt/uninhabited_enum.rs | 2 +- .../mir-opt/uninhabited_fallthrough_elimination.rs | 2 +- tests/mir-opt/uninhabited_not_read.rs | 2 +- tests/mir-opt/unusual_item_types.rs | 2 +- 144 files changed, 166 insertions(+), 149 deletions(-) diff --git a/src/doc/rustc-dev-guide/src/tests/directives.md b/src/doc/rustc-dev-guide/src/tests/directives.md index 76bf2cdbea66..506deb1942db 100644 --- a/src/doc/rustc-dev-guide/src/tests/directives.md +++ b/src/doc/rustc-dev-guide/src/tests/directives.md @@ -326,6 +326,8 @@ See [Pretty-printer](compiletest.md#pretty-printer-tests). The following directives affect how certain command-line tools are invoked, in test suites that use those tools: +- `skip-filecheck` avoids running LLVM's `FileCheck` tool in tests that would normally run it to check output. + - Used by mir-opt tests. - `filecheck-flags` adds extra flags when running LLVM's `FileCheck` tool. - Used by [codegen tests](compiletest.md#codegen-tests), [assembly tests](compiletest.md#assembly-tests), and diff --git a/src/tools/compiletest/src/directives.rs b/src/tools/compiletest/src/directives.rs index 44765c906c99..fd5c9d02b6d7 100644 --- a/src/tools/compiletest/src/directives.rs +++ b/src/tools/compiletest/src/directives.rs @@ -195,6 +195,9 @@ pub(crate) struct TestProps { /// Extra flags to pass to `llvm-cov` when producing coverage reports. /// Only used by the "coverage-run" test mode. pub(crate) llvm_cov_flags: Vec, + /// Don't run LLVM's `filecheck` tool to check compiler output, + /// in tests that would normally run it. + pub(crate) skip_filecheck: bool, /// Extra flags to pass to LLVM's `filecheck` tool, in tests that use it. pub(crate) filecheck_flags: Vec, /// Don't automatically insert any `--check-cfg` args @@ -308,6 +311,7 @@ pub(crate) fn new() -> Self { mir_unit_test: None, remap_src_base: false, llvm_cov_flags: vec![], + skip_filecheck: false, filecheck_flags: vec![], no_auto_check_cfg: false, add_minicore: false, diff --git a/src/tools/compiletest/src/directives/directive_names.rs b/src/tools/compiletest/src/directives/directive_names.rs index 34c6c1374b63..0d06f6e75af7 100644 --- a/src/tools/compiletest/src/directives/directive_names.rs +++ b/src/tools/compiletest/src/directives/directive_names.rs @@ -286,6 +286,7 @@ "rustc-env", "rustfix-only-machine-applicable", "should-fail", + "skip-filecheck", "stderr-per-bitwidth", "test-mir-pass", "unique-doc-out-dir", diff --git a/src/tools/compiletest/src/directives/handlers.rs b/src/tools/compiletest/src/directives/handlers.rs index 5e6d2d49d7dc..1f2d9709ee9d 100644 --- a/src/tools/compiletest/src/directives/handlers.rs +++ b/src/tools/compiletest/src/directives/handlers.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use std::sync::{Arc, LazyLock}; -use crate::common::Config; +use crate::common::{Config, TestMode}; use crate::directives::{ DirectiveLine, NormalizeKind, NormalizeRule, TestProps, parse_and_update_aux, parse_edition_range, split_flags, @@ -312,6 +312,18 @@ fn make_directive_handlers_map() -> HashMap<&'static str, Handler> { props.llvm_cov_flags.extend(split_flags(&flags)); } }), + handler("skip-filecheck", |config, ln, props| { + let directive_name = ln.name; + // FIXME(Zalathar): Someday we should add unified support for declaring + // and checking which modes are supported by each directive. + if !matches!(config.mode, TestMode::MirOpt) { + panic!( + "directive `//@ {directive_name}` is not supported by this test suite (mode: {mode:?})", + mode = config.mode + ); + } + config.set_name_directive(ln, directive_name, &mut props.skip_filecheck); + }), handler(FILECHECK_FLAGS, |config, ln, props| { if let Some(flags) = config.parse_name_value_directive(ln, FILECHECK_FLAGS) { props.filecheck_flags.extend(split_flags(&flags)); diff --git a/src/tools/compiletest/src/runtest/mir_opt.rs b/src/tools/compiletest/src/runtest/mir_opt.rs index 944879263834..f2e06958bc6f 100644 --- a/src/tools/compiletest/src/runtest/mir_opt.rs +++ b/src/tools/compiletest/src/runtest/mir_opt.rs @@ -40,7 +40,7 @@ fn check_mir_dump(&self, test_info: MiroptTest) { let test_dir = self.testpaths.file.parent().unwrap(); let test_crate = self.testpaths.file.file_stem().unwrap().replace('-', "_"); - let MiroptTest { run_filecheck, suffix, files, passes: _ } = test_info; + let MiroptTest { suffix, files, passes: _ } = test_info; if self.config.bless { for e in glob(&format!("{}/{}.*{}.mir", test_dir, test_crate, suffix)).unwrap() { @@ -89,7 +89,7 @@ fn check_mir_dump(&self, test_info: MiroptTest) { } } - if run_filecheck { + if !self.props.skip_filecheck { let output_path = self.output_base_name().with_extension("mir"); let proc_res = self.verify_with_filecheck(&output_path); if !proc_res.status.success() { diff --git a/src/tools/miropt-test-tools/src/lib.rs b/src/tools/miropt-test-tools/src/lib.rs index 10769c9c8abf..df1645cbf14d 100644 --- a/src/tools/miropt-test-tools/src/lib.rs +++ b/src/tools/miropt-test-tools/src/lib.rs @@ -8,7 +8,6 @@ pub struct MiroptTestFile { } pub struct MiroptTest { - pub run_filecheck: bool, pub suffix: String, pub files: Vec, /// Vec of passes under test to be dumped @@ -57,13 +56,15 @@ pub fn files_for_miropt_test( let test_crate = testfile.file_stem().unwrap().to_str().unwrap().replace('-', "_"); let suffix = output_file_suffix(testfile, bit_width, panic_strategy); - let mut run_filecheck = true; let mut passes = Vec::new(); for l in test_file_contents.lines() { + // FIXME(Zalathar): Remove this `skip-filecheck` migration error in 2027, + // or perhaps earlier if it seems no longer useful. if l.starts_with("// skip-filecheck") { - run_filecheck = false; - continue; + panic!( + "error: `// skip-filecheck` is no longer supported, use `//@ skip-filecheck` instead." + ); } if l.starts_with("// EMIT_MIR ") { let test_name = l.trim_start_matches("// EMIT_MIR ").trim(); @@ -128,10 +129,7 @@ pub fn files_for_miropt_test( out.push(MiroptTestFile { expected_file, from_file, to_file }); } - if !run_filecheck && l.trim_start().starts_with("// CHECK") { - panic!("error: test contains filecheck directive but is marked `skip-filecheck`"); - } } - MiroptTest { run_filecheck, suffix, files: out, passes } + MiroptTest { suffix, files: out, passes } } diff --git a/tests/mir-opt/README.md b/tests/mir-opt/README.md index e4b252f5565b..69705dbf2b8a 100644 --- a/tests/mir-opt/README.md +++ b/tests/mir-opt/README.md @@ -57,7 +57,7 @@ The LLVM FileCheck tool is used to verify the contents of output MIR against `CH present in the test file. This works on the runtime MIR, generated by `--emit=mir`, and not on the output of a individual passes. -Use `// skip-filecheck` to prevent FileCheck from running. +Use `//@ skip-filecheck` to prevent FileCheck from running. To check MIR for function `foo`, start with a `// CHECK-LABEL fn foo(` directive. diff --git a/tests/mir-opt/address_of.rs b/tests/mir-opt/address_of.rs index 164ab38ebe75..0e97bc8c6fe6 100644 --- a/tests/mir-opt/address_of.rs +++ b/tests/mir-opt/address_of.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR address_of.address_of_reborrow.SimplifyCfg-initial.after.mir fn address_of_reborrow() { diff --git a/tests/mir-opt/async_closure_fake_read_for_by_move.rs b/tests/mir-opt/async_closure_fake_read_for_by_move.rs index e78671f5e9d5..08a4c8a4edcb 100644 --- a/tests/mir-opt/async_closure_fake_read_for_by_move.rs +++ b/tests/mir-opt/async_closure_fake_read_for_by_move.rs @@ -1,5 +1,5 @@ //@ edition:2021 -// skip-filecheck +//@ skip-filecheck enum Foo { Bar, diff --git a/tests/mir-opt/async_closure_shims.rs b/tests/mir-opt/async_closure_shims.rs index 93cc7834a643..7bf937164d5d 100644 --- a/tests/mir-opt/async_closure_shims.rs +++ b/tests/mir-opt/async_closure_shims.rs @@ -1,5 +1,5 @@ //@ edition:2021 -// skip-filecheck +//@ skip-filecheck #![allow(unused)] diff --git a/tests/mir-opt/async_drop_live_dead.rs b/tests/mir-opt/async_drop_live_dead.rs index 348866bbb8c7..12b9d527dfad 100644 --- a/tests/mir-opt/async_drop_live_dead.rs +++ b/tests/mir-opt/async_drop_live_dead.rs @@ -1,5 +1,5 @@ //@ edition:2024 -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(async_drop)] diff --git a/tests/mir-opt/async_drop_mir_pin.rs b/tests/mir-opt/async_drop_mir_pin.rs index 35626f13f894..47f69b611a35 100644 --- a/tests/mir-opt/async_drop_mir_pin.rs +++ b/tests/mir-opt/async_drop_mir_pin.rs @@ -1,6 +1,6 @@ //@edition: 2024 //@ test-mir-pass: MentionedItems -// skip-filecheck +//@ skip-filecheck #![feature(async_drop)] #![allow(incomplete_features)] use std::future::AsyncDrop; diff --git a/tests/mir-opt/box_conditional_drop_allocator.rs b/tests/mir-opt/box_conditional_drop_allocator.rs index 9471be14c877..741c396b0c2d 100644 --- a/tests/mir-opt/box_conditional_drop_allocator.rs +++ b/tests/mir-opt/box_conditional_drop_allocator.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: ElaborateDrops //@ needs-unwind #![feature(allocator_api)] diff --git a/tests/mir-opt/build_correct_coerce.rs b/tests/mir-opt/build_correct_coerce.rs index b6c861636dca..004e1309b0b2 100644 --- a/tests/mir-opt/build_correct_coerce.rs +++ b/tests/mir-opt/build_correct_coerce.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Validate that we record the target for the `as` coercion as `for<'a> fn(&'a (), &'a ())`, // and not `for<'a, 'b>(&'a (), &'b ())`. We previously did the latter due to a bug in diff --git a/tests/mir-opt/building/async_await.rs b/tests/mir-opt/building/async_await.rs index 2d14a1fb0c6f..e84f8a6c561b 100644 --- a/tests/mir-opt/building/async_await.rs +++ b/tests/mir-opt/building/async_await.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // This test makes sure that the coroutine MIR pass eliminates all calls to // `get_context`, and that the MIR argument type for an async fn and all locals // related to `yield` are `&mut Context`, and its return type is `Poll`. diff --git a/tests/mir-opt/building/coroutine.rs b/tests/mir-opt/building/coroutine.rs index 6d50c4d90b1a..77388c8786aa 100644 --- a/tests/mir-opt/building/coroutine.rs +++ b/tests/mir-opt/building/coroutine.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ edition:2024 //@ compile-flags: -Zmir-opt-level=0 -C panic=abort diff --git a/tests/mir-opt/building/custom/aggregate_exprs.rs b/tests/mir-opt/building/custom/aggregate_exprs.rs index 8985f106817b..ec81e9a7f21c 100644 --- a/tests/mir-opt/building/custom/aggregate_exprs.rs +++ b/tests/mir-opt/building/custom/aggregate_exprs.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/arbitrary_let.rs b/tests/mir-opt/building/custom/arbitrary_let.rs index 3f251cd81bce..5075fb234d49 100644 --- a/tests/mir-opt/building/custom/arbitrary_let.rs +++ b/tests/mir-opt/building/custom/arbitrary_let.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/arrays.rs b/tests/mir-opt/building/custom/arrays.rs index e9cdded4a0e6..2022292d3e41 100644 --- a/tests/mir-opt/building/custom/arrays.rs +++ b/tests/mir-opt/building/custom/arrays.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/as_cast.rs b/tests/mir-opt/building/custom/as_cast.rs index 908d378771d5..e8e7fb265df8 100644 --- a/tests/mir-opt/building/custom/as_cast.rs +++ b/tests/mir-opt/building/custom/as_cast.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/assume.rs b/tests/mir-opt/building/custom/assume.rs index 4a55617136a1..cbbebee820d3 100644 --- a/tests/mir-opt/building/custom/assume.rs +++ b/tests/mir-opt/building/custom/assume.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/composite_return.rs b/tests/mir-opt/building/custom/composite_return.rs index 0cf2cc8d1890..4e85e9a33d74 100644 --- a/tests/mir-opt/building/custom/composite_return.rs +++ b/tests/mir-opt/building/custom/composite_return.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/consts.rs b/tests/mir-opt/building/custom/consts.rs index c64709082dc3..4f1a55a81dfa 100644 --- a/tests/mir-opt/building/custom/consts.rs +++ b/tests/mir-opt/building/custom/consts.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/enums.rs b/tests/mir-opt/building/custom/enums.rs index 6fad373203a6..ec2922922d73 100644 --- a/tests/mir-opt/building/custom/enums.rs +++ b/tests/mir-opt/building/custom/enums.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/operators.rs b/tests/mir-opt/building/custom/operators.rs index 07abf2d96517..7e9ff6c6d5a5 100644 --- a/tests/mir-opt/building/custom/operators.rs +++ b/tests/mir-opt/building/custom/operators.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: --crate-type=lib #![feature(custom_mir, core_intrinsics)] use std::intrinsics::mir::*; diff --git a/tests/mir-opt/building/custom/projections.rs b/tests/mir-opt/building/custom/projections.rs index e59eebd9952d..97d38ecf033b 100644 --- a/tests/mir-opt/building/custom/projections.rs +++ b/tests/mir-opt/building/custom/projections.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/references.rs b/tests/mir-opt/building/custom/references.rs index 7ea8f8b4c156..18169792bd8f 100644 --- a/tests/mir-opt/building/custom/references.rs +++ b/tests/mir-opt/building/custom/references.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/simple_assign.rs b/tests/mir-opt/building/custom/simple_assign.rs index d6d054ab5a38..949d8fbee9c0 100644 --- a/tests/mir-opt/building/custom/simple_assign.rs +++ b/tests/mir-opt/building/custom/simple_assign.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/custom/terminators.rs b/tests/mir-opt/building/custom/terminators.rs index ed08040a2a58..1bd796c248f8 100644 --- a/tests/mir-opt/building/custom/terminators.rs +++ b/tests/mir-opt/building/custom/terminators.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/building/enum_cast.rs b/tests/mir-opt/building/enum_cast.rs index 07025f572ab2..5beae823bcc7 100644 --- a/tests/mir-opt/building/enum_cast.rs +++ b/tests/mir-opt/building/enum_cast.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck // EMIT_MIR enum_cast.foo.built.after.mir // EMIT_MIR enum_cast.bar.built.after.mir // EMIT_MIR enum_cast.boo.built.after.mir diff --git a/tests/mir-opt/building/eq_never_type.rs b/tests/mir-opt/building/eq_never_type.rs index 486e2f9fb8df..762f20ee1e10 100644 --- a/tests/mir-opt/building/eq_never_type.rs +++ b/tests/mir-opt/building/eq_never_type.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck #![feature(never_type)] #![allow(unreachable_code)] diff --git a/tests/mir-opt/building/issue_101867.rs b/tests/mir-opt/building/issue_101867.rs index a00bc13b3fe5..91f078ccb119 100644 --- a/tests/mir-opt/building/issue_101867.rs +++ b/tests/mir-opt/building/issue_101867.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck // EMIT_MIR issue_101867.main.built.after.mir fn main() { let x: Option = Some(1); diff --git a/tests/mir-opt/building/issue_110508.rs b/tests/mir-opt/building/issue_110508.rs index aa8a7b1d08f4..5f94f2658bf7 100644 --- a/tests/mir-opt/building/issue_110508.rs +++ b/tests/mir-opt/building/issue_110508.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck // EMIT_MIR issue_110508.{impl#0}-BAR.built.after.mir // EMIT_MIR issue_110508.{impl#0}-SELF_BAR.built.after.mir diff --git a/tests/mir-opt/building/issue_49232.rs b/tests/mir-opt/building/issue_49232.rs index f17e3e955a41..6772d5aea0b8 100644 --- a/tests/mir-opt/building/issue_49232.rs +++ b/tests/mir-opt/building/issue_49232.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck // We must mark a variable whose initialization fails due to an // abort statement as StorageDead. diff --git a/tests/mir-opt/building/logical_or_in_conditional.rs b/tests/mir-opt/building/logical_or_in_conditional.rs index d1c1ea2896aa..0abf2b24ddaa 100644 --- a/tests/mir-opt/building/logical_or_in_conditional.rs +++ b/tests/mir-opt/building/logical_or_in_conditional.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Zmir-opt-level=0 -Z validate-mir //@ edition: 2024 struct Droppy(u8); diff --git a/tests/mir-opt/building/loop_match_diverges.rs b/tests/mir-opt/building/loop_match_diverges.rs index 774e195c33c9..bef91c42472c 100644 --- a/tests/mir-opt/building/loop_match_diverges.rs +++ b/tests/mir-opt/building/loop_match_diverges.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![allow(incomplete_features)] #![feature(loop_match)] #![crate_type = "lib"] diff --git a/tests/mir-opt/building/match/deref-patterns/string.rs b/tests/mir-opt/building/match/deref-patterns/string.rs index 92232c7df79d..2426cb7d1a75 100644 --- a/tests/mir-opt/building/match/deref-patterns/string.rs +++ b/tests/mir-opt/building/match/deref-patterns/string.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Z mir-opt-level=0 -C panic=abort #![feature(deref_patterns)] diff --git a/tests/mir-opt/building/match/exponential_or.rs b/tests/mir-opt/building/match/exponential_or.rs index 89963b9bdf44..e6ed7107b8b3 100644 --- a/tests/mir-opt/building/match/exponential_or.rs +++ b/tests/mir-opt/building/match/exponential_or.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test that simple or-patterns don't get expanded to exponentially large CFGs // EMIT_MIR exponential_or.match_tuple.SimplifyCfg-initial.after.mir diff --git a/tests/mir-opt/building/match/match_false_edges.rs b/tests/mir-opt/building/match/match_false_edges.rs index 839eda40c854..d58d9d406b88 100644 --- a/tests/mir-opt/building/match/match_false_edges.rs +++ b/tests/mir-opt/building/match/match_false_edges.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck fn guard() -> bool { false } diff --git a/tests/mir-opt/building/match/simple_match.rs b/tests/mir-opt/building/match/simple_match.rs index c8b3d90748af..ca084093f902 100644 --- a/tests/mir-opt/building/match/simple_match.rs +++ b/tests/mir-opt/building/match/simple_match.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test that we don't generate unnecessarily large MIR for very simple matches // EMIT_MIR simple_match.match_bool.built.after.mir diff --git a/tests/mir-opt/building/receiver_ptr_mutability.rs b/tests/mir-opt/building/receiver_ptr_mutability.rs index 37b142f1d8ad..d9adcc74b02e 100644 --- a/tests/mir-opt/building/receiver_ptr_mutability.rs +++ b/tests/mir-opt/building/receiver_ptr_mutability.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck // EMIT_MIR receiver_ptr_mutability.main.built.after.mir #![feature(arbitrary_self_types_pointers)] diff --git a/tests/mir-opt/building/shifts.rs b/tests/mir-opt/building/shifts.rs index 165b388bc18b..947e2394cfaa 100644 --- a/tests/mir-opt/building/shifts.rs +++ b/tests/mir-opt/building/shifts.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Zmir-opt-level=0 -C debug-assertions=yes // EMIT_MIR shifts.shift_signed.built.after.mir diff --git a/tests/mir-opt/building/storage_live_dead_in_statics.rs b/tests/mir-opt/building/storage_live_dead_in_statics.rs index 868f4a8f5597..1d78c4f188c5 100644 --- a/tests/mir-opt/building/storage_live_dead_in_statics.rs +++ b/tests/mir-opt/building/storage_live_dead_in_statics.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck // Check that when we compile the static `XXX` into MIR, we do not // generate `StorageStart` or `StorageEnd` statements. diff --git a/tests/mir-opt/building/uniform_array_move_out.rs b/tests/mir-opt/building/uniform_array_move_out.rs index 573e64f26dcb..58a3aa2275fd 100644 --- a/tests/mir-opt/building/uniform_array_move_out.rs +++ b/tests/mir-opt/building/uniform_array_move_out.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Zmir-opt-level=0 -// skip-filecheck +//@ skip-filecheck // Can't emit `built.after` here as that contains user type annotations which contain DefId that // change all the time. diff --git a/tests/mir-opt/building/user_type_annotations.rs b/tests/mir-opt/building/user_type_annotations.rs index 527bf62f7dc0..ecfb55be51af 100644 --- a/tests/mir-opt/building/user_type_annotations.rs +++ b/tests/mir-opt/building/user_type_annotations.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Zmir-opt-level=0 //@ edition: 2024 -// skip-filecheck +//@ skip-filecheck // This test demonstrates how many user type annotations are recorded in MIR // for various binding constructs. In particular, this makes it possible to see diff --git a/tests/mir-opt/byte_slice.rs b/tests/mir-opt/byte_slice.rs index fa616b62ad0b..cd37c3090c7c 100644 --- a/tests/mir-opt/byte_slice.rs +++ b/tests/mir-opt/byte_slice.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Z mir-opt-level=0 // EMIT_MIR byte_slice.main.SimplifyCfg-pre-optimizations.after.mir diff --git a/tests/mir-opt/const_allocation.rs b/tests/mir-opt/const_allocation.rs index e65b2ed9a879..c4f2986a8fb9 100644 --- a/tests/mir-opt/const_allocation.rs +++ b/tests/mir-opt/const_allocation.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_allocation2.rs b/tests/mir-opt/const_allocation2.rs index 0681d4356dd8..f86462ff3805 100644 --- a/tests/mir-opt/const_allocation2.rs +++ b/tests/mir-opt/const_allocation2.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_allocation3.rs b/tests/mir-opt/const_allocation3.rs index 9d2006b6fe80..2f1cbbf7b330 100644 --- a/tests/mir-opt/const_allocation3.rs +++ b/tests/mir-opt/const_allocation3.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN //@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_goto_const_eval_fail.rs b/tests/mir-opt/const_goto_const_eval_fail.rs index fa0f5f614590..df23c6e5030c 100644 --- a/tests/mir-opt/const_goto_const_eval_fail.rs +++ b/tests/mir-opt/const_goto_const_eval_fail.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(min_const_generics)] #![crate_type = "lib"] diff --git a/tests/mir-opt/const_promotion_extern_static.rs b/tests/mir-opt/const_promotion_extern_static.rs index fe258f5e8fdb..f16a53270a97 100644 --- a/tests/mir-opt/const_promotion_extern_static.rs +++ b/tests/mir-opt/const_promotion_extern_static.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ ignore-endian-big extern "C" { static X: i32; diff --git a/tests/mir-opt/const_prop/invalid_constant.rs b/tests/mir-opt/const_prop/invalid_constant.rs index 901c3721d923..f0e1f30a82fe 100644 --- a/tests/mir-opt/const_prop/invalid_constant.rs +++ b/tests/mir-opt/const_prop/invalid_constant.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN //@ compile-flags: -Zmir-enable-passes=+RemoveZsts -Zdump-mir-exclude-alloc-bytes // Verify that we can pretty print invalid constants. diff --git a/tests/mir-opt/const_prop/large_array_index.rs b/tests/mir-opt/const_prop/large_array_index.rs index afba73f6a17f..b22a0e401586 100644 --- a/tests/mir-opt/const_prop/large_array_index.rs +++ b/tests/mir-opt/const_prop/large_array_index.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/offset_of.rs b/tests/mir-opt/const_prop/offset_of.rs index c2f5e83d6868..ae0d54939186 100644 --- a/tests/mir-opt/const_prop/offset_of.rs +++ b/tests/mir-opt/const_prop/offset_of.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/coroutine_drop_cleanup.rs b/tests/mir-opt/coroutine_drop_cleanup.rs index 4ae97273cd90..f73fa6ea64f5 100644 --- a/tests/mir-opt/coroutine_drop_cleanup.rs +++ b/tests/mir-opt/coroutine_drop_cleanup.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/coroutine_storage_dead_unwind.rs b/tests/mir-opt/coroutine_storage_dead_unwind.rs index ce9bad483af8..0537aedcf230 100644 --- a/tests/mir-opt/coroutine_storage_dead_unwind.rs +++ b/tests/mir-opt/coroutine_storage_dead_unwind.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Test that we generate StorageDead on unwind paths for coroutines. diff --git a/tests/mir-opt/coroutine_tiny.rs b/tests/mir-opt/coroutine_tiny.rs index 81e9940541ba..b92628aebf96 100644 --- a/tests/mir-opt/coroutine_tiny.rs +++ b/tests/mir-opt/coroutine_tiny.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //! Tests that coroutines that cannot return or unwind don't have unnecessary //! panic branches. diff --git a/tests/mir-opt/coverage/branch_match_arms.rs b/tests/mir-opt/coverage/branch_match_arms.rs index 18764b38d6e3..10e0b27aeec8 100644 --- a/tests/mir-opt/coverage/branch_match_arms.rs +++ b/tests/mir-opt/coverage/branch_match_arms.rs @@ -1,7 +1,7 @@ #![feature(coverage_attribute)] //@ test-mir-pass: InstrumentCoverage //@ compile-flags: -Cinstrument-coverage -Zno-profiler-runtime -Zcoverage-options=branch -// skip-filecheck +//@ skip-filecheck enum Enum { A(u32), diff --git a/tests/mir-opt/dataflow.rs b/tests/mir-opt/dataflow.rs index 5ed3da4c531a..01981dfbec8b 100644 --- a/tests/mir-opt/dataflow.rs +++ b/tests/mir-opt/dataflow.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test graphviz dataflow output //@ compile-flags: -Z dump-mir=main -Z dump-mir-dataflow diff --git a/tests/mir-opt/derefer_complex_case.rs b/tests/mir-opt/derefer_complex_case.rs index 96034522b9fe..87968618b7a5 100644 --- a/tests/mir-opt/derefer_complex_case.rs +++ b/tests/mir-opt/derefer_complex_case.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ 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 7f9272bdec85..26ff026a96fc 100644 --- a/tests/mir-opt/derefer_inline_test.rs +++ b/tests/mir-opt/derefer_inline_test.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ 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 fd16c6c2045e..ebc8bb9ae94d 100644 --- a/tests/mir-opt/derefer_terminator_test.rs +++ b/tests/mir-opt/derefer_terminator_test.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ 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 5676fa657fe9..078c6c1ba043 100644 --- a/tests/mir-opt/derefer_test.rs +++ b/tests/mir-opt/derefer_test.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: Derefer // EMIT_MIR derefer_test.main.Derefer.diff fn main() { diff --git a/tests/mir-opt/derefer_test_multiple.rs b/tests/mir-opt/derefer_test_multiple.rs index 7c03af00e1e6..d2b33edbe484 100644 --- a/tests/mir-opt/derefer_test_multiple.rs +++ b/tests/mir-opt/derefer_test_multiple.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: Derefer // EMIT_MIR derefer_test_multiple.main.Derefer.diff fn main() { diff --git a/tests/mir-opt/dest-prop/nrvo_borrowed.rs b/tests/mir-opt/dest-prop/nrvo_borrowed.rs index 6f3076d4c13e..b2a01abb12b4 100644 --- a/tests/mir-opt/dest-prop/nrvo_borrowed.rs +++ b/tests/mir-opt/dest-prop/nrvo_borrowed.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //@ test-mir-pass: DestinationPropagation diff --git a/tests/mir-opt/dont_inline_type_id.rs b/tests/mir-opt/dont_inline_type_id.rs index d389733457b8..e23df9ac3dfd 100644 --- a/tests/mir-opt/dont_inline_type_id.rs +++ b/tests/mir-opt/dont_inline_type_id.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: Inline //@ compile-flags: --crate-type=lib -C panic=abort diff --git a/tests/mir-opt/elaborate_box_deref_in_debuginfo.rs b/tests/mir-opt/elaborate_box_deref_in_debuginfo.rs index 0046e7104f1c..3897f58df041 100644 --- a/tests/mir-opt/elaborate_box_deref_in_debuginfo.rs +++ b/tests/mir-opt/elaborate_box_deref_in_debuginfo.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: ElaborateBoxDerefs #![feature(custom_mir, core_intrinsics)] diff --git a/tests/mir-opt/enum_opt.rs b/tests/mir-opt/enum_opt.rs index 45a3edca90ed..90697a71cdfc 100644 --- a/tests/mir-opt/enum_opt.rs +++ b/tests/mir-opt/enum_opt.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: EnumSizeOpt // EMIT_MIR_FOR_EACH_BIT_WIDTH //@ compile-flags: -Zunsound-mir-opts diff --git a/tests/mir-opt/fn_ptr_shim.rs b/tests/mir-opt/fn_ptr_shim.rs index 326188efe019..0f46f2fc2004 100644 --- a/tests/mir-opt/fn_ptr_shim.rs +++ b/tests/mir-opt/fn_ptr_shim.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Zmir-opt-level=0 // Tests that the `` shim does not create a `Call` terminator with a `Self` callee diff --git a/tests/mir-opt/funky_arms.rs b/tests/mir-opt/funky_arms.rs index 8018f26997e4..6edfe27162f9 100644 --- a/tests/mir-opt/funky_arms.rs +++ b/tests/mir-opt/funky_arms.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/global_asm.rs b/tests/mir-opt/global_asm.rs index 22b782d365e9..f6b705a225f2 100644 --- a/tests/mir-opt/global_asm.rs +++ b/tests/mir-opt/global_asm.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ needs-asm-support // `global_asm!` gets a fake body, make sure it is handled correctly diff --git a/tests/mir-opt/graphviz.rs b/tests/mir-opt/graphviz.rs index f5e8fd77d854..2537dcab0d3a 100644 --- a/tests/mir-opt/graphviz.rs +++ b/tests/mir-opt/graphviz.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test graphviz output //@ compile-flags: -Z dump-mir-graphviz diff --git a/tests/mir-opt/gvn_on_unsafe_binder.rs b/tests/mir-opt/gvn_on_unsafe_binder.rs index b3c0576f9906..81289c50c995 100644 --- a/tests/mir-opt/gvn_on_unsafe_binder.rs +++ b/tests/mir-opt/gvn_on_unsafe_binder.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN // EMIT_MIR gvn_on_unsafe_binder.test.GVN.diff diff --git a/tests/mir-opt/gvn_ptr_eq_with_constant.rs b/tests/mir-opt/gvn_ptr_eq_with_constant.rs index 05445208e070..31ccec4c583d 100644 --- a/tests/mir-opt/gvn_ptr_eq_with_constant.rs +++ b/tests/mir-opt/gvn_ptr_eq_with_constant.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: GVN //@ only-64bit //@ compile-flags: -Z mir-enable-passes=+Inline diff --git a/tests/mir-opt/gvn_uninhabited.rs b/tests/mir-opt/gvn_uninhabited.rs index 015949c5d20b..78afc0efef90 100644 --- a/tests/mir-opt/gvn_uninhabited.rs +++ b/tests/mir-opt/gvn_uninhabited.rs @@ -1,7 +1,7 @@ //@ test-mir-pass: GVN //@ compile-flags: -O // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// skip-filecheck +//@ skip-filecheck #![feature(never_type)] diff --git a/tests/mir-opt/impossible_predicates.rs b/tests/mir-opt/impossible_predicates.rs index 34adf7f91614..3858bb657635 100644 --- a/tests/mir-opt/impossible_predicates.rs +++ b/tests/mir-opt/impossible_predicates.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR impossible_predicates.impossible_predicate.ImpossiblePredicates.diff pub fn impossible_predicate(x: &mut i32) -> (&mut i32, &mut i32) diff --git a/tests/mir-opt/inline/inline_async.rs b/tests/mir-opt/inline/inline_async.rs index c5684f51cce5..49ba0f415ede 100644 --- a/tests/mir-opt/inline/inline_async.rs +++ b/tests/mir-opt/inline/inline_async.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Checks that inliner doesn't introduce cycles when optimizing coroutines. // The outcome of optimization is not verfied, just the absence of the cycle. // Regression test for #76181. diff --git a/tests/mir-opt/inline/inline_cycle.rs b/tests/mir-opt/inline/inline_cycle.rs index 651112ccfd7f..9af70c416b3a 100644 --- a/tests/mir-opt/inline/inline_cycle.rs +++ b/tests/mir-opt/inline/inline_cycle.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -C debuginfo=full // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that inliner handles various forms of recursion and doesn't fall into diff --git a/tests/mir-opt/inline/inline_cycle_generic.rs b/tests/mir-opt/inline/inline_cycle_generic.rs index 64f208b1c70b..fd2f54c901d6 100644 --- a/tests/mir-opt/inline/inline_cycle_generic.rs +++ b/tests/mir-opt/inline/inline_cycle_generic.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that inliner handles various forms of recursion and doesn't fall into // an infinite inlining cycle. The particular outcome of inlining is not diff --git a/tests/mir-opt/inline/polymorphic_recursion.rs b/tests/mir-opt/inline/polymorphic_recursion.rs index 0338d604635e..e5a395822c6d 100644 --- a/tests/mir-opt/inline/polymorphic_recursion.rs +++ b/tests/mir-opt/inline/polymorphic_recursion.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Make sure that the MIR inliner does not loop indefinitely on polymorphic recursion. //@ compile-flags: --crate-type lib diff --git a/tests/mir-opt/inline/recursion_limit_prevents_cycle_discovery.rs b/tests/mir-opt/inline/recursion_limit_prevents_cycle_discovery.rs index 866d6fbd9e97..8a126d04d5e6 100644 --- a/tests/mir-opt/inline/recursion_limit_prevents_cycle_discovery.rs +++ b/tests/mir-opt/inline/recursion_limit_prevents_cycle_discovery.rs @@ -1,6 +1,6 @@ //@ aux-build: wrapper.rs //@ compile-flags: -Zmir-opt-level=2 -Zinline-mir -// skip-filecheck +//@ skip-filecheck // This is a regression test for https://github.com/rust-lang/rust/issues/146998 diff --git a/tests/mir-opt/inline/type_overflow.rs b/tests/mir-opt/inline/type_overflow.rs index bfd9e71b9e73..546514a6c1aa 100644 --- a/tests/mir-opt/inline/type_overflow.rs +++ b/tests/mir-opt/inline/type_overflow.rs @@ -1,7 +1,7 @@ // This is a regression test for one of the problems in #128887; it checks that the // strategy in #129714 avoids trait solver overflows in this specific case. -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Zinline-mir pub trait Foo { diff --git a/tests/mir-opt/inline/unit_test.rs b/tests/mir-opt/inline/unit_test.rs index bebe69384612..562b8e411711 100644 --- a/tests/mir-opt/inline/unit_test.rs +++ b/tests/mir-opt/inline/unit_test.rs @@ -1,6 +1,6 @@ // Check that `-Zmir-enable-passes=+Inline` does not ICE because of stolen MIR. //@ test-mir-pass: Inline -// skip-filecheck +//@ skip-filecheck #![crate_type = "lib"] // Randomize `def_path_hash` by defining them under a module with different names diff --git a/tests/mir-opt/inline_coroutine_body.rs b/tests/mir-opt/inline_coroutine_body.rs index 4326ff8a11b3..c97738baa882 100644 --- a/tests/mir-opt/inline_coroutine_body.rs +++ b/tests/mir-opt/inline_coroutine_body.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// skip-filecheck +//@ skip-filecheck //@ 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_default_trait_body.rs b/tests/mir-opt/inline_default_trait_body.rs index aeb8031b4186..cad0e4d20328 100644 --- a/tests/mir-opt/inline_default_trait_body.rs +++ b/tests/mir-opt/inline_default_trait_body.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: Inline //@ edition: 2021 //@ compile-flags: -Zinline-mir --crate-type=lib diff --git a/tests/mir-opt/inline_double_cycle.rs b/tests/mir-opt/inline_double_cycle.rs index cf3b87cf0ad3..e76977586f78 100644 --- a/tests/mir-opt/inline_double_cycle.rs +++ b/tests/mir-opt/inline_double_cycle.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: Inline //@ edition: 2021 //@ compile-flags: -Zinline-mir --crate-type=lib diff --git a/tests/mir-opt/inline_generically_if_sized.rs b/tests/mir-opt/inline_generically_if_sized.rs index e4fc94ec4362..ecd0440e7332 100644 --- a/tests/mir-opt/inline_generically_if_sized.rs +++ b/tests/mir-opt/inline_generically_if_sized.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: Inline //@ compile-flags: --crate-type=lib -C panic=abort diff --git a/tests/mir-opt/issue_101973.rs b/tests/mir-opt/issue_101973.rs index 84a36f1374e8..66f594028fa7 100644 --- a/tests/mir-opt/issue_101973.rs +++ b/tests/mir-opt/issue_101973.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ 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 "test-mir-pass". diff --git a/tests/mir-opt/issue_104451_unwindable_intrinsics.rs b/tests/mir-opt/issue_104451_unwindable_intrinsics.rs index 80655a583c34..a449c4592e84 100644 --- a/tests/mir-opt/issue_104451_unwindable_intrinsics.rs +++ b/tests/mir-opt/issue_104451_unwindable_intrinsics.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Check that `UnwindAction::Unreachable` is not generated for unwindable intrinsics. // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(core_intrinsics)] diff --git a/tests/mir-opt/issue_120925_unsafefncast.rs b/tests/mir-opt/issue_120925_unsafefncast.rs index f80ae66efdae..06d016d0a159 100644 --- a/tests/mir-opt/issue_120925_unsafefncast.rs +++ b/tests/mir-opt/issue_120925_unsafefncast.rs @@ -1,5 +1,5 @@ // Verify that we do not ICE when attempting to interpret casts between fn types. -// skip-filecheck +//@ skip-filecheck static FOO: fn() = || assert_ne!(42, 43); static BAR: fn(i32, i32) = |a, b| assert_ne!(a, b); diff --git a/tests/mir-opt/issue_38669.rs b/tests/mir-opt/issue_38669.rs index 9da4c89bb121..dd63f0e6a973 100644 --- a/tests/mir-opt/issue_38669.rs +++ b/tests/mir-opt/issue_38669.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // check that we don't StorageDead booleans before they are used // EMIT_MIR issue_38669.main.SimplifyCfg-initial.after.mir diff --git a/tests/mir-opt/issue_41110.rs b/tests/mir-opt/issue_41110.rs index 5d042815f3b4..730db950ae9d 100644 --- a/tests/mir-opt/issue_41110.rs +++ b/tests/mir-opt/issue_41110.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // check that we don't emit multiple drop flags when they are not needed. diff --git a/tests/mir-opt/issue_41697.rs b/tests/mir-opt/issue_41697.rs index b031f1dc7201..4b79c9d178c3 100644 --- a/tests/mir-opt/issue_41697.rs +++ b/tests/mir-opt/issue_41697.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Regression test for #41697. Using dump-mir was triggering // artificial cycles: during type-checking, we had to get the MIR for // the constant expressions in `[u8; 2]`, which in turn would trigger diff --git a/tests/mir-opt/issue_41888.rs b/tests/mir-opt/issue_41888.rs index 1744d9f85701..fc1073c33414 100644 --- a/tests/mir-opt/issue_41888.rs +++ b/tests/mir-opt/issue_41888.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // check that we clear the "ADT master drop flag" even when there are // no fields to be dropped. diff --git a/tests/mir-opt/issue_62289.rs b/tests/mir-opt/issue_62289.rs index 6db2ec2a3719..a1ed7d142fbc 100644 --- a/tests/mir-opt/issue_62289.rs +++ b/tests/mir-opt/issue_62289.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // check that we don't forget to drop the Box if we early return before // initializing it // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/issue_72181.rs b/tests/mir-opt/issue_72181.rs index dea8ecbd3ec7..04d273f1c78d 100644 --- a/tests/mir-opt/issue_72181.rs +++ b/tests/mir-opt/issue_72181.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Z mir-opt-level=1 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags. diff --git a/tests/mir-opt/issue_72181_1.rs b/tests/mir-opt/issue_72181_1.rs index 5c8346166aec..1e7c70c449d9 100644 --- a/tests/mir-opt/issue_72181_1.rs +++ b/tests/mir-opt/issue_72181_1.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Z mir-opt-level=1 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags. diff --git a/tests/mir-opt/issue_76432.rs b/tests/mir-opt/issue_76432.rs index 6d884063caaf..f881b75e78f8 100644 --- a/tests/mir-opt/issue_76432.rs +++ b/tests/mir-opt/issue_76432.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that we do not insert StorageDead at each target if StorageDead was never seen diff --git a/tests/mir-opt/issue_78192.rs b/tests/mir-opt/issue_78192.rs index a82f0e3a6653..675f1d85f4e4 100644 --- a/tests/mir-opt/issue_78192.rs +++ b/tests/mir-opt/issue_78192.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Zmir-opt-level=1 -Zinline-mir pub fn f(a: &T) -> *const T { let b: &*const T = &(a as *const T); diff --git a/tests/mir-opt/issue_91633.rs b/tests/mir-opt/issue_91633.rs index d24c2e19aa73..3922ccc42284 100644 --- a/tests/mir-opt/issue_91633.rs +++ b/tests/mir-opt/issue_91633.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Z mir-opt-level=0 // EMIT_MIR issue_91633.hey.built.after.mir fn hey(it: &[T]) diff --git a/tests/mir-opt/issue_99325.rs b/tests/mir-opt/issue_99325.rs index 4cee4f20b31b..6e108cd27a6c 100644 --- a/tests/mir-opt/issue_99325.rs +++ b/tests/mir-opt/issue_99325.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_BIT_WIDTH #![feature(adt_const_params, unsized_const_params)] diff --git a/tests/mir-opt/loop_test.rs b/tests/mir-opt/loop_test.rs index bc9b65961070..fd8c7829e2a8 100644 --- a/tests/mir-opt/loop_test.rs +++ b/tests/mir-opt/loop_test.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Z identify_regions // Tests to make sure we correctly generate falseUnwind edges in loops diff --git a/tests/mir-opt/match_arm_scopes.rs b/tests/mir-opt/match_arm_scopes.rs index 43746e993985..2de70fed3a46 100644 --- a/tests/mir-opt/match_arm_scopes.rs +++ b/tests/mir-opt/match_arm_scopes.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Test that StorageDead and Drops are generated properly for bindings in // matches: diff --git a/tests/mir-opt/matches_u8.rs b/tests/mir-opt/matches_u8.rs index 86d646256742..b7e839ebd3b1 100644 --- a/tests/mir-opt/matches_u8.rs +++ b/tests/mir-opt/matches_u8.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: MatchBranchSimplification // EMIT_MIR matches_u8.exhaustive_match.MatchBranchSimplification.diff diff --git a/tests/mir-opt/multiple_return_terminators.rs b/tests/mir-opt/multiple_return_terminators.rs index 8d83082a829e..25cccd3bd696 100644 --- a/tests/mir-opt/multiple_return_terminators.rs +++ b/tests/mir-opt/multiple_return_terminators.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Z mir-opt-level=4 // EMIT_MIR multiple_return_terminators.test.MultipleReturnTerminators.diff diff --git a/tests/mir-opt/nll/named_lifetimes_basic.rs b/tests/mir-opt/nll/named_lifetimes_basic.rs index 93f4a8bfd598..71faf4e9e0ac 100644 --- a/tests/mir-opt/nll/named_lifetimes_basic.rs +++ b/tests/mir-opt/nll/named_lifetimes_basic.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Basic test for named lifetime translation. Check that we // instantiate the types that appear in function arguments with // suitable variables and that we setup the outlives relationship diff --git a/tests/mir-opt/nll/region_subtyping_basic.rs b/tests/mir-opt/nll/region_subtyping_basic.rs index ee74f7af2eb7..95491640ef08 100644 --- a/tests/mir-opt/nll/region_subtyping_basic.rs +++ b/tests/mir-opt/nll/region_subtyping_basic.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Basic test for liveness constraints: the region (`R1`) that appears // in the type of `p` includes the points after `&v[0]` up to (but not // including) the call to `use_x`. The `else` branch is not included. diff --git a/tests/mir-opt/no_drop_for_inactive_variant.rs b/tests/mir-opt/no_drop_for_inactive_variant.rs index c94b36971ca2..2aa832fbec13 100644 --- a/tests/mir-opt/no_drop_for_inactive_variant.rs +++ b/tests/mir-opt/no_drop_for_inactive_variant.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Ensure that there are no drop terminators in `unwrap` (except the one along the cleanup diff --git a/tests/mir-opt/no_spurious_drop_after_call.rs b/tests/mir-opt/no_spurious_drop_after_call.rs index cd7b8fb79425..40377ad2aaf7 100644 --- a/tests/mir-opt/no_spurious_drop_after_call.rs +++ b/tests/mir-opt/no_spurious_drop_after_call.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Test that after the call to `std::mem::drop` we do not generate a diff --git a/tests/mir-opt/or_pattern.rs b/tests/mir-opt/or_pattern.rs index 0ad0ce8ead1e..df375aed3d5b 100644 --- a/tests/mir-opt/or_pattern.rs +++ b/tests/mir-opt/or_pattern.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR or_pattern.shortcut_second_or.SimplifyCfg-initial.after.mir fn shortcut_second_or() { diff --git a/tests/mir-opt/packed_struct_drop_aligned.rs b/tests/mir-opt/packed_struct_drop_aligned.rs index 3abc6426e7f0..455a3cb15b29 100644 --- a/tests/mir-opt/packed_struct_drop_aligned.rs +++ b/tests/mir-opt/packed_struct_drop_aligned.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR packed_struct_drop_aligned.main.SimplifyCfg-pre-optimizations.after.mir diff --git a/tests/mir-opt/pre-codegen/chained_comparison.rs b/tests/mir-opt/pre-codegen/chained_comparison.rs index 4869f1e01a02..8c359bda143a 100644 --- a/tests/mir-opt/pre-codegen/chained_comparison.rs +++ b/tests/mir-opt/pre-codegen/chained_comparison.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs index 561bafa96516..58e59686de7f 100644 --- a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs +++ b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=0 #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/intrinsics.rs b/tests/mir-opt/pre-codegen/intrinsics.rs index 0482b85e95f8..42200e0b87fc 100644 --- a/tests/mir-opt/pre-codegen/intrinsics.rs +++ b/tests/mir-opt/pre-codegen/intrinsics.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 // Checks that we do not have any branches in the MIR for the two tested functions. diff --git a/tests/mir-opt/pre-codegen/loops.rs b/tests/mir-opt/pre-codegen/loops.rs index 952dd8cac60f..281595f165be 100644 --- a/tests/mir-opt/pre-codegen/loops.rs +++ b/tests/mir-opt/pre-codegen/loops.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -Zmir-opt-level=2 -g //@ ignore-std-debug-assertions (debug assertions result in different inlines) //@ needs-unwind diff --git a/tests/mir-opt/pre-codegen/mem_replace.rs b/tests/mir-opt/pre-codegen/mem_replace.rs index be23dcdb22ae..750a7907c15e 100644 --- a/tests/mir-opt/pre-codegen/mem_replace.rs +++ b/tests/mir-opt/pre-codegen/mem_replace.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir //@ ignore-std-debug-assertions // Reason: precondition checks on ptr::read/write are under cfg(debug_assertions) diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs index 44b4b0ad888a..6fb71bda9b44 100644 --- a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs +++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes diff --git a/tests/mir-opt/pre-codegen/ptr_offset.rs b/tests/mir-opt/pre-codegen/ptr_offset.rs index 120be99fc94a..1e936222a2dd 100644 --- a/tests/mir-opt/pre-codegen/ptr_offset.rs +++ b/tests/mir-opt/pre-codegen/ptr_offset.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir //@ ignore-std-debug-assertions (precondition checks are under cfg(debug_assertions)) // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/pre-codegen/range_iter.rs b/tests/mir-opt/pre-codegen/range_iter.rs index 5aa617227ce6..856d57cd6e4f 100644 --- a/tests/mir-opt/pre-codegen/range_iter.rs +++ b/tests/mir-opt/pre-codegen/range_iter.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/pre-codegen/slice_filter.rs b/tests/mir-opt/pre-codegen/slice_filter.rs index 35881ff2b18c..a6f4a52075df 100644 --- a/tests/mir-opt/pre-codegen/slice_filter.rs +++ b/tests/mir-opt/pre-codegen/slice_filter.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/slice_iter.rs b/tests/mir-opt/pre-codegen/slice_iter.rs index 46ded729852a..f9049c79803e 100644 --- a/tests/mir-opt/pre-codegen/slice_iter.rs +++ b/tests/mir-opt/pre-codegen/slice_iter.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 //@ only-64bit (constants for `None::<&T>` show in the output) //@ ignore-std-debug-assertions (precondition checks on ptr::add are under cfg(debug_assertions)) diff --git a/tests/mir-opt/pre-codegen/spans.rs b/tests/mir-opt/pre-codegen/spans.rs index 940089d2d498..51aad44579da 100644 --- a/tests/mir-opt/pre-codegen/spans.rs +++ b/tests/mir-opt/pre-codegen/spans.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test that the comments we emit in MIR opts are accurate. // // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/pre-codegen/try_identity.rs b/tests/mir-opt/pre-codegen/try_identity.rs index 264b303e381d..876f86fe52ba 100644 --- a/tests/mir-opt/pre-codegen/try_identity.rs +++ b/tests/mir-opt/pre-codegen/try_identity.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 // Track the status of MIR optimizations simplifying `Ok(res?)` for both the old and new desugarings diff --git a/tests/mir-opt/pre-codegen/vec_deref.rs b/tests/mir-opt/pre-codegen/vec_deref.rs index 3476e1760c0a..75edd9bd8794 100644 --- a/tests/mir-opt/pre-codegen/vec_deref.rs +++ b/tests/mir-opt/pre-codegen/vec_deref.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/remove_fake_borrows.rs b/tests/mir-opt/remove_fake_borrows.rs index 21c7b46ee1a3..c69fdaf12552 100644 --- a/tests/mir-opt/remove_fake_borrows.rs +++ b/tests/mir-opt/remove_fake_borrows.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test that the fake borrows for matches are removed after borrow checking. // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/remove_never_const.rs b/tests/mir-opt/remove_never_const.rs index 81562058d808..9307b8e76050 100644 --- a/tests/mir-opt/remove_never_const.rs +++ b/tests/mir-opt/remove_never_const.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // This was originally a regression test for #66975 - ensure that we do not generate never typed // consts in codegen. We also have tests for this that catches the error, see // tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs. diff --git a/tests/mir-opt/retag.rs b/tests/mir-opt/retag.rs index 001c55991383..11bdc5b973f9 100644 --- a/tests/mir-opt/retag.rs +++ b/tests/mir-opt/retag.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: AddRetag // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // ignore-tidy-linelength diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/return_an_array.rs index 673b5df7d730..2af48ae6a5b9 100644 --- a/tests/mir-opt/return_an_array.rs +++ b/tests/mir-opt/return_an_array.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // this tests move up progration, which is not yet implemented fn foo() -> [u8; 1024] { diff --git a/tests/mir-opt/separate_const_switch.rs b/tests/mir-opt/separate_const_switch.rs index 058359429802..245a47a6ecca 100644 --- a/tests/mir-opt/separate_const_switch.rs +++ b/tests/mir-opt/separate_const_switch.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck #![feature(try_trait_v2)] //@ compile-flags: -Zunsound-mir-opts diff --git a/tests/mir-opt/simplify_cfg.rs b/tests/mir-opt/simplify_cfg.rs index b1fdc5e64a0e..889510385247 100644 --- a/tests/mir-opt/simplify_cfg.rs +++ b/tests/mir-opt/simplify_cfg.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test that the goto chain starting from bb0 is collapsed. //@ compile-flags: -Cpanic=abort //@ no-prefer-dynamic diff --git a/tests/mir-opt/simplify_locals.rs b/tests/mir-opt/simplify_locals.rs index 6511b5e87e47..f0c442bd0c1a 100644 --- a/tests/mir-opt/simplify_locals.rs +++ b/tests/mir-opt/simplify_locals.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ 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 70d1555e786b..424b25c2b745 100644 --- a/tests/mir-opt/simplify_locals_removes_unused_consts.rs +++ b/tests/mir-opt/simplify_locals_removes_unused_consts.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //@ test-mir-pass: SimplifyLocals-before-const-prop //@ compile-flags: -C overflow-checks=no 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 6257f5ee795a..327c7bd6ad12 100644 --- a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs +++ b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ test-mir-pass: SimplifyLocals-before-const-prop fn map(x: Option>) -> Option> { diff --git a/tests/mir-opt/slice_drop_shim.rs b/tests/mir-opt/slice_drop_shim.rs index f34c34855a16..b8ae44ef6821 100644 --- a/tests/mir-opt/slice_drop_shim.rs +++ b/tests/mir-opt/slice_drop_shim.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ compile-flags: -Zmir-opt-level=0 -Clink-dead-code // mir-opt tests are always built as rlibs so that they seamlessly cross-compile, // so this test only produces MIR for the drop_in_place we're looking for diff --git a/tests/mir-opt/ssa_unreachable_116212.rs b/tests/mir-opt/ssa_unreachable_116212.rs index 9f1cf223e263..f8550556f54d 100644 --- a/tests/mir-opt/ssa_unreachable_116212.rs +++ b/tests/mir-opt/ssa_unreachable_116212.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Regression test for issue #116212. #![feature(never_type)] diff --git a/tests/mir-opt/storage_ranges.rs b/tests/mir-opt/storage_ranges.rs index 5a68d5684654..49f4fdf58913 100644 --- a/tests/mir-opt/storage_ranges.rs +++ b/tests/mir-opt/storage_ranges.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR storage_ranges.main.nll.0.mir fn main() { diff --git a/tests/mir-opt/switch_to_self.rs b/tests/mir-opt/switch_to_self.rs index 51a7c13494fb..0e963834305d 100644 --- a/tests/mir-opt/switch_to_self.rs +++ b/tests/mir-opt/switch_to_self.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test that MatchBranchSimplification doesn't ICE on a SwitchInt where // one of the targets is the block that the SwitchInt terminates. #![crate_type = "lib"] diff --git a/tests/mir-opt/tail_call_drops.rs b/tests/mir-opt/tail_call_drops.rs index 56f4852a95f4..f58623465a1e 100644 --- a/tests/mir-opt/tail_call_drops.rs +++ b/tests/mir-opt/tail_call_drops.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![allow(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/mir-opt/tail_expr_drop_order_unwind.rs b/tests/mir-opt/tail_expr_drop_order_unwind.rs index 065e08c34096..49283a433f7c 100644 --- a/tests/mir-opt/tail_expr_drop_order_unwind.rs +++ b/tests/mir-opt/tail_expr_drop_order_unwind.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.mir diff --git a/tests/mir-opt/tls_access.rs b/tests/mir-opt/tls_access.rs index 3dfc85def99e..465282e1a2e7 100644 --- a/tests/mir-opt/tls_access.rs +++ b/tests/mir-opt/tls_access.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // EMIT_MIR tls_access.main.PreCodegen.after.mir //@ compile-flags: -Zmir-opt-level=0 diff --git a/tests/mir-opt/uninhabited_enum.rs b/tests/mir-opt/uninhabited_enum.rs index 124693c0fe2c..2ef76449e3cc 100644 --- a/tests/mir-opt/uninhabited_enum.rs +++ b/tests/mir-opt/uninhabited_enum.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // // check that we mark blocks with `!` locals as unreachable. // (and currently don't do the same for other uninhabited types) diff --git a/tests/mir-opt/uninhabited_fallthrough_elimination.rs b/tests/mir-opt/uninhabited_fallthrough_elimination.rs index 537935d8ae43..a89f160a5f09 100644 --- a/tests/mir-opt/uninhabited_fallthrough_elimination.rs +++ b/tests/mir-opt/uninhabited_fallthrough_elimination.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck enum Empty {} enum S { diff --git a/tests/mir-opt/uninhabited_not_read.rs b/tests/mir-opt/uninhabited_not_read.rs index 4c80f5e55c68..c1598d0301f6 100644 --- a/tests/mir-opt/uninhabited_not_read.rs +++ b/tests/mir-opt/uninhabited_not_read.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck //@ edition: 2021 // In ed 2021 and below, we fallback `!` to `()`. diff --git a/tests/mir-opt/unusual_item_types.rs b/tests/mir-opt/unusual_item_types.rs index 2f05981e812e..77174fdd2fee 100644 --- a/tests/mir-opt/unusual_item_types.rs +++ b/tests/mir-opt/unusual_item_types.rs @@ -1,4 +1,4 @@ -// skip-filecheck +//@ skip-filecheck // Test that we don't ICE when trying to dump MIR for unusual item types and // that we don't create filenames containing `<` and `>` //@ compile-flags: -Zmir-opt-level=0