Open
Description
This fails to compile, but it shouldn't:
pub trait Trait {}
pub trait WithAssoc<'a> {
type Assoc;
}
impl<T> Trait for for<'a> fn(T, <T as WithAssoc<'a>>::Assoc) where T: for<'a> WithAssoc<'a> {}
impl WithAssoc<'_> for u8 {
type Assoc = u8;
}
fn main() {
fn impls_trait<T: Trait>() {}
impls_trait::<fn(u8, u8)>;
//~^ ERROR the trait bound `fn(u8, u8): Trait` is not satisfied
}
@rustbot label C-bug T-types A-traits A-associated-items