Skip to content

Commit f4aa209

Browse files
authored
Rollup merge of rust-lang#139438 - Zalathar:fix-test-122600, r=scottmcm
Prevent a test from seeing forbidden numbers in the rustc version The final CHECK-NOT directive in this test was able to see past the end of the enclosing function, and find the substring `753` or `754` in the git hash in the rustc version number, causing false failures in CI whenever the git hash happens to contain those digits in sequence. Adding an explicit check for `ret` prevents the CHECK-NOT directive from seeing past the end of the function. --- Manually tested by adding `// CHECK-NOT: rustc` after the existing CHECK-NOT directives, and demonstrating that the new check prevents it from seeing the rustc version string.
2 parents f55034b + f6afb35 commit f4aa209

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/codegen/issues/issue-122600-ptr-discriminant-update.rs

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ pub unsafe fn update(s: *mut State) {
3636
// CHECK-NOT: store
3737
// CHECK-NOT: memcpy
3838
// CHECK-NOT: 75{{3|4}}
39+
40+
// CHECK: ret
3941
let State::A(v) = s.read() else { std::hint::unreachable_unchecked() };
4042
s.write(State::B(v));
4143
}

0 commit comments

Comments
 (0)