Check for array lengths that aren't actually usize#134371
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 16, 2024
Merged
Check for array lengths that aren't actually usize#134371bors merged 1 commit intorust-lang:masterfrom
usize#134371bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
Contributor
|
@bors r+ rollup |
Collaborator
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
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``
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 19, 2025
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: - rust-lang#133734 - its bugfix rust-lang#134371 - rust-lang#134330 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
Lower index bounds checking to
PtrMetadata, this time with the right fake borrow semantics 😸
#135748
Merged
github-actions bot
pushed a commit
to tautschnig/verify-rust-std
that referenced
this pull request
Mar 11, 2025
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: - rust-lang#133734 - its bugfix rust-lang#134371 - rust-lang#134330 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.
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Temporarily bring back `Rvalue::Len` r? `@compiler-errors` as requested in rust-lang/rust#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 #135671 for which we somehow didn't have test coverage, this PR temporarily reverts: - rust-lang/rust#133734 - its bugfix rust-lang/rust#134371 - rust-lang/rust#134330 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/rust#135671 (comment)). Fixes #135671. And if we want to land this, it should also be nominated for beta backport.
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Temporarily bring back `Rvalue::Len` r? `@compiler-errors` as requested in rust-lang/rust#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 #135671 for which we somehow didn't have test coverage, this PR temporarily reverts: - rust-lang/rust#133734 - its bugfix rust-lang/rust#134371 - rust-lang/rust#134330 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/rust#135671 (comment)). Fixes #135671. And if we want to land this, it should also be nominated for beta backport.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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