delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition#155031
Conversation
|
HIR ty lowering was modified cc @fmease |
This comment has been minimized.
This comment has been minimized.
1d62869 to
5eea9f8
Compare
|
@bors r+ |
|
Reminder, once the PR becomes ready for a review, use |
5eea9f8 to
5a32e40
Compare
|
@rustbot ready |
|
Thanks! @bors r=petrochenkov,fmease rollup |
…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
|
This pull request was unapproved. This PR was contained in a rollup (#155061), which was unapproved. |
5a32e40 to
9e8069f
Compare
|
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. |
|
@rustbot ready |
|
@bors try jobs=x86_64-gnu-llvm-21-3 |
This comment has been minimized.
This comment has been minimized.
…e, r=<try> delegation: fix unelided lifetime ICE, refactoring of GenericArgPosition try-job: x86_64-gnu-llvm-21-3
|
r=me after CI is green. |
|
✌️ @aerooneqq, you can now approve this pull request! If @petrochenkov told you to " |
|
@bors r+ |
|
@bors r=petrochenkov |
…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
…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)
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
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