trait Foo<T> {}
trait Bar<A> {
fn method<B>(&self) where A: Foo<B>;
}
struct S;
struct K;
struct X;
struct Z;
impl Foo<S> for X {}
impl Foo<K> for Z {}
impl Bar<X> for isize {
fn method<U>(&self) where X: Foo<U> {
}
}
impl Bar<Z> for isize {
fn method<U>(&self) where Z: Foo<U> {
}
}
fn main() {
1is.method::<S>();
}
compile time error:
where-clause-method-substituion.rs:35:9: 35:22 error: unable to infer enough type information about `_`; type annotations required
where-clause-method-substituion.rs:35 1is.method::<S>();
^~~~~~~~~~~~~