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

Remove bounds check when array is indexed by enum #103584

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

ouz-a
Copy link
Contributor

@ouz-a ouz-a commented Oct 26, 2022

As the title says, this reverts the behavior introduced with 1.64.

Fixes #102303

r? @oli-obk

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 26, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 26, 2022

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 26, 2022
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do some manual rustfmting since rustfmt is broken on this file

@ouz-a
Copy link
Contributor Author

ouz-a commented Oct 27, 2022

Please do some manual rustfmting since rustfmt is broken on this file

Formatted some more, let me know if it's still bad.

@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 28, 2022

Formatted some more, let me know if it's still bad.

it is

you can just copy your added code into the playground and rustfmt it there and copy it back, I think that should work

@ouz-a ouz-a force-pushed the issue-102303 branch 2 times, most recently from 0f6652d to 97c9365 Compare October 28, 2022 18:04
Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the comments have been addressed, squash all commits

@oli-obk
Copy link
Contributor

oli-obk commented Oct 30, 2022

@bors delegate+

r=me with commits squashed

@bors
Copy link
Contributor

bors commented Oct 30, 2022

✌️ @ouz-a can now approve this pull request

@ouz-a
Copy link
Contributor Author

ouz-a commented Oct 30, 2022

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Oct 30, 2022

📌 Commit 689d9d4b426661a2df66ccab014bd2fe76e5cfe0 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 Oct 30, 2022
@bors
Copy link
Contributor

bors commented Oct 31, 2022

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

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 31, 2022
@ouz-a
Copy link
Contributor Author

ouz-a commented Oct 31, 2022

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Oct 31, 2022

📌 Commit a1672ad 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 31, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 1, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#103061 (Rewrite implementation of `#[alloc_error_handler]`)
 - rust-lang#103584 (Remove bounds check when array is indexed by enum)
 - rust-lang#103706 (Fix E0433 No Typo Suggestions)
 - rust-lang#103729 (interpret: fix align_of_val on packed types)
 - rust-lang#103759 (Use `adt_def` during type collection.)
 - rust-lang#103809 (Fix a typo in std::net mod doc comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 94241e7 into rust-lang:master Nov 1, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 1, 2022
@ouz-a ouz-a deleted the issue-102303 branch July 26, 2023 12:56
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.

Array indexed by enum cast to usize no longer has bounds check eliminated
7 participants