- Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Labels
T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
struct B<T>(T); impl B<fn(&'static ())> { fn method(self) { println!("hey"); } } fn foo(x: B<for<'a> fn(&'a ())>) { x.method(); // ok, method call B::<for<'a> fn(&'a ())>::method(x); // ok, explicit path } fn main() { }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:
struct B<T>(T); impl B<fn(&'static ())> { fn method(self) { println!("hey"); } } fn foo(y: B<fn(&'static ())>) { // looks like it requires a hr fn pointer, // but we never check that. B::<for<'a> fn(&'a ())>::method(y); } fn main() {}compiler-errors and BoxyUwU
Metadata
Metadata
Assignees
Labels
T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.