summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/associated-types-eq-expr-path.rs
blob: 143992f29f197eb32b494020d15971be9359a485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Check that an associated type cannot be bound in an expression path.

trait Foo {
    type A;
    fn bar() -> isize;
}

impl Foo for isize {
    type A = usize;
    fn bar() -> isize { 42 }
}

pub fn main() {
    let x: isize = Foo::<A=usize>::bar();
    //~^ ERROR associated type bindings are not allowed here
}