Adjust with_generic_param_rib.#142716
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 21, 2025
Merged
Conversation
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.
Contributor
|
@bors r+ |
Collaborator
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
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`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently all of its call sites construct a
LifetimeRibKind::Genericsvalue, whichwith_generic_param_ribthen deconstructs (and panics if it's a differentLifetimeRibKindvariant).This commit makes the code simpler and shorter: the call sites just pass in the three values and
with_generic_param_ribconstructs theLifetimeRibKind::Genericsvalue from them.r? @petrochenkov