Skip to content

Adjust with_generic_param_rib. #142716

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 1 commit into from
Jun 21, 2025

Conversation

nnethercote
Copy link
Contributor

Currently all of its call sites construct a LifetimeRibKind::Generics value, which with_generic_param_rib then deconstructs (and panics if it's a different LifetimeRibKind variant).

This commit makes the code simpler and shorter: the call sites just pass in the three values and with_generic_param_rib constructs the LifetimeRibKind::Generics value from them.

r? @petrochenkov

Currently all of its call sites construct a `LifetimeRibKind::Generics`
value, which `with_generic_param_rib` then deconstructs (and panics if
it's a different `LifetimeRibKind` variant).

This commit makes the code simpler and shorter: the call sites just pass
in the three values and `with_generic_param_rib` constructs the
`LifetimeRibKind::Generics` value from them.
@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 Jun 19, 2025
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 19, 2025

📌 Commit 41ca0cb has been approved by petrochenkov

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 Jun 19, 2025
@nnethercote
Copy link
Contributor Author

@bors rollup

bors added a commit that referenced this pull request Jun 21, 2025
Rollup of 8 pull requests

Successful merges:

 - #142384 (Bringing `rustc_rayon_core` in tree as `rustc_thread_pool`)
 - #142476 (Insert parentheses around binary operation with attribute)
 - #142485 (Marks ADT live if it appears in pattern)
 - #142571 (Reason about borrowed classes in CopyProp.)
 - #142677 (Add CI check to ensure that rustdoc JSON `FORMAT_VERSION` is correctly updated)
 - #142716 (Adjust `with_generic_param_rib`.)
 - #142756 (Make `Clone` a `const_trait`)
 - #142765 (rustc_target: document public AbiMap-related fn and variants)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 44d50f9 into rust-lang:master Jun 21, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 21, 2025
rust-timer added a commit that referenced this pull request Jun 21, 2025
Rollup merge of #142716 - nnethercote:adjust-with_generic_param_rib, r=petrochenkov

Adjust `with_generic_param_rib`.

Currently all of its call sites construct a `LifetimeRibKind::Generics` value, which `with_generic_param_rib` then deconstructs (and panics if it's a different `LifetimeRibKind` variant).

This commit makes the code simpler and shorter: the call sites just pass in the three values and `with_generic_param_rib` constructs the `LifetimeRibKind::Generics` value from them.

r? `@petrochenkov`
@nnethercote nnethercote deleted the adjust-with_generic_param_rib branch June 22, 2025 02:45
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