SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 65 Rust

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 rust-lang/rust#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/rust#154178, part of rust-lang/rust#118212.

r? @petrochenkov
J
Jonathan Brouwer committed
3b8c7eccdc4c474ba383cd5b98b161626b355429
Committed by GitHub <noreply@github.com> on 4/10/2026, 1:33:14 PM