Skip to content

Remove redundant vec and duplicate indexing in find_noop_landing_pads - #164934

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
panstromek:cleanup-noop-landing-pads
Oct 26, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
panstromek:cleanup-noop-landing-pads

Conversation

@panstromek

@panstromek panstromek commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The original code looks like some refactoring artifact. The map().collect() chain is redundant because the vec is immediately turned into iterator again, and it throws away the BasicBlockData reference just to look it up again in the main loop.

@rustbot

rustbot commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Oct 25, 2026
@rustbot

rustbot commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

r? @mati865

rustbot has assigned @mati865.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, mir, mir-opt
  • compiler, mir, mir-opt expanded to 77 candidates
  • Random selection from 20 candidates

@rust-log-analyzer

This comment has been minimized.

@hanna-kruppe

Copy link
Copy Markdown
Contributor

r=me after squashing

@bors delegate+

@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

✌️ @panstromek, you can now approve this pull request!

If @hanna-kruppe told you to "r=me" after making some further change, then please make that change and post @bors r=hanna-kruppe.

View changes since this delegation.

@hanna-kruppe hanna-kruppe assigned hanna-kruppe and unassigned mati865 Oct 25, 2026
@panstromek
panstromek force-pushed the cleanup-noop-landing-pads branch from 6197c3f to 1744ae8 Compare October 25, 2026 21:12
@hanna-kruppe

Copy link
Copy Markdown
Contributor

The CI failure should be solved by #164929

@panstromek

Copy link
Copy Markdown
Contributor Author

Thanks!

@bors r=hanna-kruppe

@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1744ae8 has been tentatively approved by hanna-kruppe

It will be put into the queue for this repository once PR CI succeeds.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot 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 25, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot 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 25, 2026
@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

❌ Commit 1744ae8 has been unapproved due to PR CI failure. Reapprove it with @bors r+ force if you want to ignore the failure.

@hanna-kruppe

Copy link
Copy Markdown
Contributor

@bors r+ force rollup

@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1744ae8 has been approved by hanna-kruppe

It is now in the queue for this repository.

Warning

This PR was force-approved despite failing PR CI.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot 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 25, 2026
@hanna-kruppe

Copy link
Copy Markdown
Contributor

On second thought, let’s not take risks by skipping CI when there’s no rush. r=me when CI is fixed, until then @bors r-

@rust-bors rust-bors Bot 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 25, 2026
@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

View changes since this unapproval

@panstromek

Copy link
Copy Markdown
Contributor Author

I think this should be fine now, the gcc revert was merged.

@bors r=hanna-kruppe

@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

❌ Cannot approve commit 1744ae8, because CI currently fails on this PR. Use @bors r+ force to override the PR CI check.

@panstromek
panstromek force-pushed the cleanup-noop-landing-pads branch from 1744ae8 to ecf1622 Compare October 26, 2026 06:41
@rustbot

rustbot commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@panstromek

Copy link
Copy Markdown
Contributor Author

ok, I rebased to trigger CI again

@bors r=hanna-kruppe

@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ecf1622 has been tentatively approved by hanna-kruppe

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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 26, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 26, 2026
…ds, r=hanna-kruppe

Remove redundant vec and duplicate indexing in find_noop_landing_pads

The original code looks like some refactoring artifact. The `map().collect()` chain is redundant because the `vec` is immediately turned into iterator again, and it throws away the `BasicBlockData` reference just to look it up again in the main loop.
rust-bors Bot pushed a commit that referenced this pull request Oct 26, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #164955 (Use the updated buffer length in UEFI locate_handles)
 - #164958 (uefi: roll back env changes when `start_image` fails)
 - #164968 (thread_local::guard: update comments a bit)
 - #164303 (Remove the 'sub' method from 'At' and migrate to 'sub_raw')
 - #164674 (Use a NoSpan marker for region constraints without spans)
 - #164856 (Switch from `insta` to `expect-test` in bootstrap)
 - #164934 (Remove redundant vec and duplicate indexing in find_noop_landing_pads)
 - #164954 (Reduce `SpanData` use)
rust-bors Bot pushed a commit that referenced this pull request Oct 26, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #164955 (Use the updated buffer length in UEFI locate_handles)
 - #164958 (uefi: roll back env changes when `start_image` fails)
 - #164968 (thread_local::guard: update comments a bit)
 - #164303 (Remove the 'sub' method from 'At' and migrate to 'sub_raw')
 - #164674 (Use a NoSpan marker for region constraints without spans)
 - #164934 (Remove redundant vec and duplicate indexing in find_noop_landing_pads)
 - #164954 (Reduce `SpanData` use)
 - #164970 (`rust-analyzer` subtree update)
@rust-bors
rust-bors Bot merged commit c9a9ce2 into rust-lang:main Oct 26, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 26, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 26, 2026
Rollup merge of #164934 - panstromek:cleanup-noop-landing-pads, r=hanna-kruppe

Remove redundant vec and duplicate indexing in find_noop_landing_pads

The original code looks like some refactoring artifact. The `map().collect()` chain is redundant because the `vec` is immediately turned into iterator again, and it throws away the `BasicBlockData` reference just to look it up again in the main loop.
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.

5 participants