Skip to content

Commit

Permalink
Rollup merge of rust-lang#131927 - clubby789:skip-filecheck-directive…
Browse files Browse the repository at this point in the history
…s, r=Mark-Simulacrum

Check for filecheck directives in files marked `skip-filecheck`

cc rust-lang#116971
  • Loading branch information
matthiaskrgr authored Oct 20, 2024
2 parents 2a9b6d9 + ebfe0e4 commit 7fbed7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/tools/miropt-test-tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ 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 }
Expand Down
3 changes: 1 addition & 2 deletions tests/mir-opt/dest-prop/union.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//! Tests that we can propagate into places that are projections into unions
//@ compile-flags: -Zunsound-mir-opts -C debuginfo=full
Expand All @@ -8,7 +7,7 @@ fn val() -> u32 {

// EMIT_MIR union.main.DestinationPropagation.diff
fn main() {
// CHECK-LABEL: fn args(
// CHECK-LABEL: fn main(
// CHECK: {{_.*}} = Un { us: const 1_u32 };
union Un {
us: u32,
Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/issues/issue_59352.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// This test is a mirror of codegen/issue-59352.rs.
// The LLVM inliner doesn't inline `char::method::is_digit()` and so it doesn't recognize this case
Expand Down

0 comments on commit 7fbed7b

Please sign in to comment.