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

Change Successors to impl Iterator<Item = BasicBlock> #97079

Merged
merged 1 commit into from
May 17, 2022

Conversation

SparrowLii
Copy link
Member

@SparrowLii SparrowLii commented May 16, 2022

This PR fixes the FIXME in compiler\rustc_middle\src\mir\mod.rs.
This can omit several &, * or cloned operations on Successros' generated elements

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

r? @nagisa

(rust-highfive has picked a reviewer for you, use r? to override)

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

This comment has been minimized.

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

please revert the unrelated change. Apart from that this is great 👍 thanks

@@ -9,6 +9,7 @@ use rustc_index::vec::IndexVec;
use rustc_middle::mir::coverage::*;
use rustc_middle::mir::{self, BasicBlock, BasicBlockData, Terminator, TerminatorKind};

use rustc_middle::mir::TerminatorKind::SwitchInt;
Copy link
Contributor

Choose a reason for hiding this comment

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

please revert this change to the previous state. Don't think that this is an improvement.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Has fixed it

@lcnr
Copy link
Contributor

lcnr commented May 16, 2022

r? @lcnr
@bors delegate+

@bors
Copy link
Contributor

bors commented May 16, 2022

✌️ @SparrowLii can now approve this pull request

@rust-highfive rust-highfive assigned lcnr and unassigned nagisa May 16, 2022
@SparrowLii
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented May 17, 2022

📌 Commit 38bf115 has been approved by lcnr

@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 May 17, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request May 17, 2022
Change `Successors` to `impl Iterator<Item = BasicBlock>`

This PR fixes the FIXME in `compiler\rustc_middle\src\mir\mod.rs`.
This can omit several `&`, `*` or `cloned` operations on Successros' generated elements
bors added a commit to rust-lang-ci/rust that referenced this pull request May 17, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#96329 (Add a couple tests for rust-lang#90887 fixes)
 - rust-lang#97009 (Allow `unused_macro_rules` in path tests)
 - rust-lang#97075 (Add regression test for rust-lang#81804)
 - rust-lang#97079 (Change `Successors` to `impl Iterator<Item = BasicBlock>`)
 - rust-lang#97080 (remove the `RelateResultCompare` trait)
 - rust-lang#97093 (Migrate `maybe_recover_from_bad_type_plus` diagnostic)
 - rust-lang#97102 (Update function pointer call error message)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 70cd85f into rust-lang:master May 17, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 17, 2022
xFrednet pushed a commit to xFrednet/rust that referenced this pull request May 21, 2022
Change `Successors` to `impl Iterator<Item = BasicBlock>`

This PR fixes the FIXME in `compiler\rustc_middle\src\mir\mod.rs`.
This can omit several `&`, `*` or `cloned` operations on Successros' generated elements
xFrednet pushed a commit to xFrednet/rust that referenced this pull request May 21, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#96329 (Add a couple tests for rust-lang#90887 fixes)
 - rust-lang#97009 (Allow `unused_macro_rules` in path tests)
 - rust-lang#97075 (Add regression test for rust-lang#81804)
 - rust-lang#97079 (Change `Successors` to `impl Iterator<Item = BasicBlock>`)
 - rust-lang#97080 (remove the `RelateResultCompare` trait)
 - rust-lang#97093 (Migrate `maybe_recover_from_bad_type_plus` diagnostic)
 - rust-lang#97102 (Update function pointer call error message)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
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.

7 participants