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
Here's a small example that one might expect to work but doesn't:
traitT0{typeO;}structS<A>(A);impl<A>T0forS<A>{typeO = A;}traitT1:T0{// this looks okay but as we see below, `f` is unusablefnm0<F:Fn(<SelfasT0>::O) -> bool>(self,f:F) -> bool;}// // complains about the bounds on F here not being required by the trait// impl<A> T1 for S<A> {// fn m0<F: Fn(A) -> bool>(self, f: F) -> bool { f(self.0) }// }// // complains about mismatched types: <S<A> as T0>::O vs. A// impl<A> T1 for S<A>// {// fn m0<F: Fn(<Self as T0>::O) -> bool>(self, f: F) -> bool { f(self.0) }// }
The text was updated successfully, but these errors were encountered:
@darinmorrison I would expect this to be another sad consequence of handling the bounds placed on type parameters differently then the ones placed in where clauses. @nikomatsakis is helping me close down #20020 which should ideally fix this bug.
Here's a small example that one might expect to work but doesn't:
The text was updated successfully, but these errors were encountered: