]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/associated-types-eq-1.rs
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[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() {}