Skip to content

Compute array length from type for unconditional panic lint. #129517

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Oct 5, 2024

Conversation

cjgillot
Copy link
Contributor

Fixes #98444

The cases that involve slicing are harder, so #38035 remains open.

@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2024

r? @pnkfelix

rustbot has assigned @pnkfelix.
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 Aug 24, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Aug 25, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@bors
Copy link
Collaborator

bors commented Oct 2, 2024

☔ The latest upstream changes (presumably #131143) made this pull request unmergeable. Please resolve the merge conflicts.

@cjgillot cjgillot changed the title Compute array length from type for unconditional panic. Compute array length from type for unconditional panic lint. Oct 2, 2024
@pnkfelix
Copy link
Member

pnkfelix commented Oct 4, 2024

Sorry for the delay in review.

This looks great to me.

r=me once its been rebased.

@pnkfelix
Copy link
Member

pnkfelix commented Oct 4, 2024

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 4, 2024
@cjgillot
Copy link
Contributor Author

cjgillot commented Oct 5, 2024

@bors r=pnkfelix

@bors
Copy link
Collaborator

bors commented Oct 5, 2024

📌 Commit 479779d has been approved by pnkfelix

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 5, 2024
…kingjubilee

Rollup of 9 pull requests

Successful merges:

 - rust-lang#129517 (Compute array length from type for unconditional panic lint. )
 - rust-lang#130367 (Check elaborated projections from dyn don't mention unconstrained late bound lifetimes)
 - rust-lang#130403 (Stabilize `const_slice_from_raw_parts_mut`)
 - rust-lang#130633 (Add support for reborrowing pinned method receivers)
 - rust-lang#131105 (update `Literal`'s intro)
 - rust-lang#131194 (Fix needless_lifetimes in stable_mir)
 - rust-lang#131260 (rustdoc: cleaner errors on disambiguator/namespace mismatches)
 - rust-lang#131267 (Stabilize `BufRead::skip_until`)
 - rust-lang#131273 (Account for `impl Trait {` when `impl Trait for Type {` was intended)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f09e5a7 into rust-lang:master Oct 5, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 5, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 5, 2024
Rollup merge of rust-lang#129517 - cjgillot:known-panic-array, r=pnkfelix

Compute array length from type for unconditional panic lint.

Fixes rust-lang#98444

The cases that involve slicing are harder, so rust-lang#38035 remains open.
@cjgillot cjgillot deleted the known-panic-array branch October 5, 2024 11:44
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 18, 2024
…elix

Compute array length from type for unconditional panic lint.

Fixes rust-lang#98444

The cases that involve slicing are harder, so rust-lang#38035 remains open.
# for free to join this conversation on GitHub. Already have an account? # 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.

Taking a shared reference of an array suppresses the unconditional_panic lint
5 participants