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
I would like us to change method selection for associated items to use equality. It feels very wrong to completely ignore the user type annotation here:
structB<T>(T);implB<fn(&'static ())>{fnmethod(self){println!("hey");}}fnfoo(y:B<fn(&'static ())>){// looks like it requires a hr fn pointer,// but we never check that.B::<for<'a> fn(&'a ())>::method(y);}fnmain(){}
lcnr
added
A-resolve
Area: Name resolution
T-types
Relevant to the types team, which will review and decide on the PR/issue.
and removed
A-resolve
Area: Name resolution
labels
Jun 10, 2024
…=<try>
Relate receiver invariantly in method probe for `Mode::Path`
Reverts rust-lang#126128
Fixes the part of rust-lang#122317 which always used subtyping instead of eq
Fixesrust-lang#126227 (TODO: test)
WIP: description
r? lcnr
fee1-dead
added a commit
to fee1-dead-contrib/rust
that referenced
this issue
Sep 17, 2024
… r=lcnr
Relate receiver invariantly in method probe for `Mode::Path`
Effectively reverts part of rust-lang#126128Fixesrust-lang#126227
This PR changes method probing to use equality for fully path-based method lookup, and subtyping for receiver `.` method lookup.
r? lcnr
I would like us to change method selection for associated items to use equality. It feels very wrong to completely ignore the user type annotation here:
cc #126128 @compiler-errors @oli-obk
The text was updated successfully, but these errors were encountered: