]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-eq-1.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / associated-types-eq-1.rs
1 // Test equality constraints on associated types. Check that unsupported syntax
2 // does not ICE.
3
4 pub trait Foo {
5     type A;
6     fn boo(&self) -> <Self as Foo>::A;
7 }
8
9 fn foo2<I: Foo>(x: I) {
10     let _: A = x.boo(); //~ ERROR cannot find type `A` in this scope
11 }
12
13 pub fn main() {}