Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop checking for the absence of something that doesn't exist #111525

Merged
merged 1 commit into from
May 15, 2023

Conversation

scottmcm
Copy link
Member

A couple of codegen tests are doing

// CHECK-NOT: slice_index_len_fail

However, that function no longer exists: the only places it occurs in the repo are in those tests.

So this PR updates the tests to check for the absense of the functions that are actually used today to panic for out-of-bounds indexing.

A couple of codegen tests are doing
```
// CHECK-NOT: slice_index_len_fail
```

However, that function no longer exists: [the only places](https://github.com/search?q=repo%3Arust-lang%2Frust+slice_index_len_fail&type=code) it occurs in the repo are in those tests.

So this PR updates the tests to check for the absense of the functions that are actually used today to panic for out-of-bounds indexing.
@rustbot
Copy link
Collaborator

rustbot commented May 13, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 13, 2023
@Mark-Simulacrum
Copy link
Member

@bors r+

I wonder if we should have a positive test in the same file where we do expect bounds checks...

@bors
Copy link
Contributor

bors commented May 13, 2023

📌 Commit a9570a3 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 13, 2023
@scottmcm scottmcm changed the title Stop checking for the absense of something that doesn't exist Stop checking for the absence of something that doesn't exist May 15, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#108291 (Fix more benchmark test with black_box)
 - rust-lang#108356 (improve doc test for UnsafeCell::raw_get)
 - rust-lang#110049 (Don't claim `LocalKey::with` prevents a reference to be sent across threads)
 - rust-lang#111525 (Stop checking for the absence of something that doesn't exist)
 - rust-lang#111538 (Make sure the build.rustc version is either the same or 1 apart)
 - rust-lang#111578 (Move expansion of query macros in rustc_middle to rustc_middle::query)
 - rust-lang#111584 (Number lexing tweaks)
 - rust-lang#111587 (Custom MIR: Support `Rvalue::CopyForDeref`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e52fbff into rust-lang:master May 15, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 15, 2023
@scottmcm scottmcm deleted the slice-position-tweak branch May 15, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants