You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support generic lifetime arguments in method calls
Fixes#42403Fixes#42115
Lifetimes in a method call `x.f::<'a, 'b, T, U>()` are treated exactly like lifetimes in the equivalent UFCS call `X::f::<'a, 'b, T, U>`.
In addition, if the method has late bound lifetime parameters (explicit or implicit), then explicitly specifying lifetime arguments is not permitted (guarded by a compatibility lint).
[breaking-change] because previously lifetimes in method calls were accepted unconditionally.
r? @eddyb
This snippet successfully compiles despite
f
not having lifetime parameters and even'a
,'b
,'c
being non-existent.The parser parses lifetime arguments, but doesn't store them anywhere, so they don't present in AST/HIR.
The issue exists since Rust 1.0.
The text was updated successfully, but these errors were encountered: