1 // Test equality constraints on associated types. Check we get an error when an
2 // equality constraint is used in a qualified path.
3 
4 pub trait Foo {
5     type A;
boo(&self) -> <Self as Foo>::A6     fn boo(&self) -> <Self as Foo>::A;
7 }
8 
9 struct Bar;
10 
11 impl Foo for isize {
12     type A = usize;
boo(&self) -> usize13     fn boo(&self) -> usize { 42 }
14 }
15 
baz<I: Foo>(x: &<I as Foo<A=Bar>>::A)16 fn baz<I: Foo>(x: &<I as Foo<A=Bar>>::A) {}
17 //~^ ERROR associated type bindings are not allowed here
18 
main()19 pub fn main() {}
20