]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-eq-expr-path.rs
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
[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 }