]> git.lizzy.rs Git - rust.git/blob - tests/ui/where-clauses/where-clause-method-substituion.rs
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / where-clauses / where-clause-method-substituion.rs
1 trait Foo<T> {
2     fn dummy(&self, t: T) { }
3 }
4
5 trait Bar<A> {
6     fn method<B>(&self) where A: Foo<B>;
7 }
8
9 struct S;
10 struct X;
11
12 // Remove this impl causing the below resolution to fail // impl Foo<S> for X {}
13
14 impl Bar<X> for isize {
15     fn method<U>(&self) where X: Foo<U> {
16     }
17 }
18
19 fn main() {
20     1.method::<X>();
21     //~^ ERROR the trait bound `X: Foo<X>` is not satisfied
22 }