delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition#155031
Open
aerooneqq wants to merge 1 commit intorust-lang:mainfrom
Open
delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition#155031aerooneqq wants to merge 1 commit intorust-lang:mainfrom
aerooneqq wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
HIR ty lowering was modified cc @fmease |
This comment has been minimized.
This comment has been minimized.
1d62869 to
5eea9f8
Compare
Contributor
|
@bors r+ |
Contributor
fmease
requested changes
Apr 9, 2026
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
petrochenkov
reviewed
Apr 9, 2026
5eea9f8 to
5a32e40
Compare
Contributor
Author
|
@rustbot ready |
Member
|
Thanks! @bors r=petrochenkov,fmease rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 9, 2026
…lowering-ice, r=petrochenkov,fmease delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition This PR does two things: - First it restores `lower_generic_args_of_path` as it was before rust-lang#151864, as it turns out we should use `GenericArgPosition::Type` for generic args lowering for signature inheritance, as it will not cause lifetime inference and then ICEs during child args lowering, - Next it refactors `GenericArgPosition` enum replacing `Value` and `MethodCall` with `Call(IsMethodCall)`, as the only place where we created `Value` or `MethodCall` variants was in `check_generic_arg_count_for_call`, where it was a match over `is_method_call`. Not sure it is needed, but seems cleaner to me. Fixes rust-lang#154178, part of rust-lang#118212. r? @petrochenkov
Contributor
Contributor
|
This pull request was unapproved. This PR was contained in a rollup (#155061), which was unapproved. |
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.
This PR does two things:
lower_generic_args_of_pathas it was before Implement AST -> HIR generics propagation in delegation #151864, as it turns out we should useGenericArgPosition::Typefor generic args lowering for signature inheritance, as it will not cause lifetime inference and then ICEs during child args lowering,GenericArgPositionenum replacingValueandMethodCallwithCall(IsMethodCall), as the only place where we createdValueorMethodCallvariants was incheck_generic_arg_count_for_call, where it was a match overis_method_call. Not sure it is needed, but seems cleaner to me.Fixes #154178, part of #118212.
r? @petrochenkov