]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-in-ambiguous-context.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / associated-types-in-ambiguous-context.rs
1 trait Get {
2     type Value;
3     fn get(&self) -> <Self as Get>::Value;
4 }
5
6 fn get<T:Get,U:Get>(x: T, y: U) -> Get::Value {}
7 //~^ ERROR ambiguous associated type
8
9 trait Grab {
10     type Value;
11     fn grab(&self) -> Grab::Value;
12     //~^ ERROR ambiguous associated type
13
14     fn get(&self) -> Get::Value;
15     //~^ ERROR ambiguous associated type
16 }
17
18 trait Bar {}
19
20 trait Foo where Foo::Assoc: Bar {
21 //~^ ERROR ambiguous associated type
22     type Assoc;
23 }
24
25 type X = std::ops::Deref::Target;
26 //~^ ERROR ambiguous associated type
27
28 fn main() {
29 }