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. Adding an explicit check for `ret` prevents the CHECK-NOT directive from seeing past the end of the function.
This commit is contained in:
parent
5e17a2a91d
commit
f6afb35c61
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ pub unsafe fn update(s: *mut State) {
|
|||
// CHECK-NOT: store
|
||||
// CHECK-NOT: memcpy
|
||||
// CHECK-NOT: 75{{3|4}}
|
||||
|
||||
// CHECK: ret
|
||||
let State::A(v) = s.read() else { std::hint::unreachable_unchecked() };
|
||||
s.write(State::B(v));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue