Check for array lengths that aren't actually usize by scottmcm · Pull Request #134371 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation3 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

scottmcm

I wish typeck wouldn't give us ty::Arrays that have this problem in the first place, but we can check for it.

Fixes #134352
cc @matthiaskrgr

@scottmcm

@rustbot

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Dec 16, 2024

@oli-obk

@bors

📌 Commit 43a79a0 has been approved by oli-obk

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

Dec 16, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Dec 16, 2024

@matthiaskrgr

Check for array lengths that aren't actually usize

I wish typeck wouldn't give us ty::Arrays that have this problem in the first place, but we can check for it.

Fixes rust-lang#134352 cc @matthiaskrgr

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 16, 2024

@bors

…iaskrgr

Rollup of 5 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 16, 2024

@bors

…iaskrgr

Rollup of 5 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 16, 2024

@bors

…iaskrgr

Rollup of 5 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 16, 2024

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Dec 16, 2024

@rust-timer

Rollup merge of rust-lang#134371 - scottmcm:fix-134352, r=oli-obk

Check for array lengths that aren't actually usize

I wish typeck wouldn't give us ty::Arrays that have this problem in the first place, but we can check for it.

Fixes rust-lang#134352 cc @matthiaskrgr

lqd added a commit to lqd/rust that referenced this pull request

Jan 18, 2025

@lqd

…-obk"

This reverts commit 7c301ec, reversing changes made to dffaad8.

@lqd lqd mentioned this pull request

Jan 18, 2025

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 19, 2025

@bors

Temporarily bring back Rvalue::Len

r? @compiler-errors as requested in rust-lang#135671 (comment)

However, in the mean time, I'd rather we not crunch trying to find and more importantly validate the soundness of a solution 🤔

Agreed. To fix the IMO P-critical rust-lang#135671 for which we somehow didn't have test coverage, this PR temporarily reverts:

cc @scottmcm

I added the few samples from that issue as a test, but we can add more in the future, in particular it seems @steffahn [will work on that](rust-lang#135671 (comment)).

Fixes rust-lang#135671. And if we want to land this, it should also be nominated for beta backport.

This was referenced

Jan 19, 2025

cuviper pushed a commit to cuviper/rust that referenced this pull request

Jan 24, 2025

@lqd @cuviper

…-obk"

This reverts commit 7c301ec, reversing changes made to dffaad8.

(cherry picked from commit 0bb4880)

cuviper pushed a commit to cuviper/rust that referenced this pull request

Feb 6, 2025

@lqd @cuviper

…-obk"

This reverts commit 7c301ec, reversing changes made to dffaad8.

(cherry picked from commit 0bb4880)

github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request

Mar 11, 2025

@bors

Temporarily bring back Rvalue::Len

r? @compiler-errors as requested in rust-lang#135671 (comment)

However, in the mean time, I'd rather we not crunch trying to find and more importantly validate the soundness of a solution 🤔

Agreed. To fix the IMO P-critical rust-lang#135671 for which we somehow didn't have test coverage, this PR temporarily reverts:

cc @scottmcm

I added the few samples from that issue as a test, but we can add more in the future, in particular it seems @steffahn [will work on that](rust-lang#135671 (comment)).

Fixes rust-lang#135671. And if we want to land this, it should also be nominated for beta backport.

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.