Skip to content

Drop-build cleanups #141627

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

Merged
merged 4 commits into from
May 28, 2025
Merged

Drop-build cleanups #141627

merged 4 commits into from
May 28, 2025

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented May 27, 2025

Some cleanups I made while trying to speed up the program in #134404.

r? @matthewjasper

It's not needed, because `next` and `local` fields uniquely identify the
drop. This is a ~2% speed win on the very large program in rust-lang#134404, and
it's also a tiny bit simpler.
Because `Scope` also has a field named `drops`, and I found having two
fields with the same name made this code harder to read.
This pattern of iterating over scopes and drops occurs multiple times in
this file, with slight variations. All of them use `for` loops except
this one. This commits changes it for consistency.
@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 May 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 27, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please remove them as they will spam the issue with references to the commit.

@nnethercote
Copy link
Contributor Author

Best reviewed one commit at a time.

@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented May 27, 2025

📌 Commit ec8baa5 has been approved by matthewjasper

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 May 27, 2025
tgross35 added a commit to tgross35/rust that referenced this pull request May 28, 2025
…ewjasper

Drop-build cleanups

Some cleanups I made while trying to speed up the program in rust-lang#134404.

r? `@matthewjasper`
bors added a commit that referenced this pull request May 28, 2025
Rollup of 8 pull requests

Successful merges:

 - #140369 (Add data_ptr method to Mutex and RwLock)
 - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`)
 - #141404 (Improve intrinsic handling in cg_ssa)
 - #141407 (Refactor the two-phase check for impls and impl items)
 - #141411 (rustdoc: linking to a local proc macro no longer warns)
 - #141548 (consider glob imports in cfg suggestion)
 - #141627 (Drop-build cleanups)
 - #141670 (Fix ICE in tokenstream with contracts from parser recovery)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request May 28, 2025
…ewjasper

Drop-build cleanups

Some cleanups I made while trying to speed up the program in rust-lang#134404.

r? ``@matthewjasper``
bors added a commit that referenced this pull request May 28, 2025
Rollup of 8 pull requests

Successful merges:

 - #140369 (Add data_ptr method to Mutex and RwLock)
 - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`)
 - #141404 (Improve intrinsic handling in cg_ssa)
 - #141407 (Refactor the two-phase check for impls and impl items)
 - #141411 (rustdoc: linking to a local proc macro no longer warns)
 - #141548 (consider glob imports in cfg suggestion)
 - #141627 (Drop-build cleanups)
 - #141670 (Fix ICE in tokenstream with contracts from parser recovery)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request May 28, 2025
Rollup of 7 pull requests

Successful merges:

 - #140369 (Add data_ptr method to Mutex and RwLock)
 - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`)
 - #141404 (Improve intrinsic handling in cg_ssa)
 - #141411 (rustdoc: linking to a local proc macro no longer warns)
 - #141548 (consider glob imports in cfg suggestion)
 - #141627 (Drop-build cleanups)
 - #141670 (Fix ICE in tokenstream with contracts from parser recovery)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 97f6e6e into rust-lang:master May 28, 2025
7 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 28, 2025
rust-timer added a commit that referenced this pull request May 28, 2025
Rollup merge of #141627 - nnethercote:drop-cleanups, r=matthewjasper

Drop-build cleanups

Some cleanups I made while trying to speed up the program in #134404.

r? ```@matthewjasper```
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.

4 participants