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

Check for array lengths that aren't actually usize #134371

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

scottmcm
Copy link
Member

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

@rustbot
Copy link
Collaborator

rustbot commented Dec 16, 2024

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
Copy link
Contributor

oli-obk commented Dec 16, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 16, 2024

📌 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
Check for array lengths that aren't actually `usize`

I wish typeck wouldn't give us `ty::Array`s 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
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#134202 (Remove `rustc::existing_doc_keyword` lint)
 - rust-lang#134354 (Handle fndef rendering together with signature rendering)
 - rust-lang#134368 (Use links to edition guide for edition migrations)
 - rust-lang#134371 (Check for array lengths that aren't actually `usize`)
 - rust-lang#134378 (An octuple of polonius fact generation cleanups)

Failed merges:

 - rust-lang#134365 (Rename `rustc_mir_build::build` to `builder`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 16, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#134202 (Remove `rustc::existing_doc_keyword` lint)
 - rust-lang#134354 (Handle fndef rendering together with signature rendering)
 - rust-lang#134368 (Use links to edition guide for edition migrations)
 - rust-lang#134371 (Check for array lengths that aren't actually `usize`)
 - rust-lang#134378 (An octuple of polonius fact generation cleanups)

Failed merges:

 - rust-lang#134365 (Rename `rustc_mir_build::build` to `builder`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 16, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#134202 (Remove `rustc::existing_doc_keyword` lint)
 - rust-lang#134354 (Handle fndef rendering together with signature rendering)
 - rust-lang#134368 (Use links to edition guide for edition migrations)
 - rust-lang#134371 (Check for array lengths that aren't actually `usize`)
 - rust-lang#134378 (An octuple of polonius fact generation cleanups)

Failed merges:

 - rust-lang#134365 (Rename `rustc_mir_build::build` to `builder`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 16, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#134124 (CI: use free runners for x86_64-gnu-llvm jobs)
 - rust-lang#134197 (rustc_mir_build: Clarify that 'mirrored' does not mean 'flipped' or 'reversed')
 - rust-lang#134260 (Correctly handle comments in attributes in doctests source code)
 - rust-lang#134277 (rustdoc-search: handle `impl Into<X>` better)
 - rust-lang#134284 (Keep track of patterns that could have introduced a binding, but didn't)
 - rust-lang#134337 (reject unsound toggling of RISCV target features)
 - rust-lang#134371 (Check for array lengths that aren't actually `usize`)
 - rust-lang#134385 (tests/ui/asm: Remove uses of rustc_attrs, lang_items, and decl_macro features by using minicore)
 - rust-lang#134386 (Some trait method vs impl method signature difference diagnostic cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7c301ec into rust-lang:master Dec 16, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 16, 2024
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::Array`s that have this problem in the first place, but we can check for it.

Fixes rust-lang#134352
cc ``@matthiaskrgr``
@scottmcm scottmcm deleted the fix-134352 branch December 17, 2024 02:29
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: invalid asymmetric binary op Lt
4 participants