]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/associated-types-eq-1.rs
Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors
[rust.git] / tests / 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() {}