summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/associated-types-eq-1.rs
blob: c371138ff45b100d24d34145878a24f00efb379a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Test equality constraints on associated types. Check that unsupported syntax
// does not ICE.

pub trait Foo {
    type A;
    fn boo(&self) -> <Self as Foo>::A;
}

fn foo2<I: Foo>(x: I) {
    let _: A = x.boo(); //~ ERROR cannot find type `A` in this scope
}

pub fn main() {}