]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-eq-expr-path.rs
Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyup
[rust.git] / src / test / ui / associated-types / associated-types-eq-expr-path.rs
1 // Check that an associated type cannot be bound in an expression path.
2
3 trait Foo {
4     type A;
5     fn bar() -> isize;
6 }
7
8 impl Foo for isize {
9     type A = usize;
10     fn bar() -> isize { 42 }
11 }
12
13 pub fn main() {
14     let x: isize = Foo::<A=usize>::bar();
15     //~^ ERROR associated type bindings are not allowed here
16 }