delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition#155031
Merged
rust-bors[bot] merged 1 commit intoApr 10, 2026
Merged
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
5a32e40 to
9e8069f
Compare
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. |
Contributor
Author
|
@rustbot ready |
Contributor
|
@bors try jobs=x86_64-gnu-llvm-21-3 |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 10, 2026
…e, r=<try> delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition try-job: x86_64-gnu-llvm-21-3
Contributor
|
r=me after CI is green. |
Contributor
Contributor
|
✌️ @aerooneqq, you can now approve this pull request! If @petrochenkov told you to " |
Contributor
Contributor
Author
|
@bors r+ |
Contributor
Member
|
@bors r=petrochenkov |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 10, 2026
…lowering-ice, r=petrochenkov 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
This was referenced Apr 10, 2026
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 10, 2026
…uwer Rollup of 8 pull requests Successful merges: - #155047 (Always exhaustively match on typing mode) - #155080 (Simplify `try_load_from_disk_fn`.) - #152384 (Restrict EII declarations to functions at lowering time) - #153796 (Fix ICE when combining #[eii] with #[core::contracts::ensures]) - #154369 (Fix `pattern_from_macro_note` for bit-or expr) - #155027 ( Rename some more of our internal `#[rustc_*]` TEST attributes) - #155031 (delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition) - #155040 (Fix code block whitespace handling in Markdown)
rust-timer
added a commit
that referenced
this pull request
Apr 10, 2026
Rollup merge of #155031 - aerooneqq:delegation-generic-args-lowering-ice, r=petrochenkov 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 #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 #154178, part of #118212. r? @petrochenkov
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Apr 13, 2026
…uwer Rollup of 8 pull requests Successful merges: - rust-lang/rust#155047 (Always exhaustively match on typing mode) - rust-lang/rust#155080 (Simplify `try_load_from_disk_fn`.) - rust-lang/rust#152384 (Restrict EII declarations to functions at lowering time) - rust-lang/rust#153796 (Fix ICE when combining #[eii] with #[core::contracts::ensures]) - rust-lang/rust#154369 (Fix `pattern_from_macro_note` for bit-or expr) - rust-lang/rust#155027 ( Rename some more of our internal `#[rustc_*]` TEST attributes) - rust-lang/rust#155031 (delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition) - rust-lang/rust#155040 (Fix code block whitespace handling in Markdown)
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.
View all comments
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