summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr
blob: 00856b55df5ece3ba2e995e921b61b1c3ad93d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:6:36
   |
LL | fn get<T:Get,U:Get>(x: T, y: U) -> Get::Value {}
   |                                    ^^^^^^^^^^
   |
help: if there were a type named `Example` that implemented `Get`, you could use the fully-qualified path
   |
LL | fn get<T:Get,U:Get>(x: T, y: U) -> <Example as Get>::Value {}
   |                                    ~~~~~~~~~~~~~~~~~~~~~~~

error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:20:17
   |
LL | trait Foo where Foo::Assoc: Bar {
   |                 ^^^^^^^^^^ help: use the fully-qualified path: `<Self as Foo>::Assoc`

error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:25:10
   |
LL | type X = std::ops::Deref::Target;
   |          ^^^^^^^^^^^^^^^^^^^^^^^
   |
help: if there were a type named `Example` that implemented `Deref`, you could use the fully-qualified path
   |
LL | type X = <Example as Deref>::Target;
   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:11:23
   |
LL |     fn grab(&self) -> Grab::Value;
   |                       ^^^^^^^^^^^ help: use the fully-qualified path: `<Self as Grab>::Value`

error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:14:22
   |
LL |     fn get(&self) -> Get::Value;
   |                      ^^^^^^^^^^
   |
help: if there were a type named `Example` that implemented `Get`, you could use the fully-qualified path
   |
LL |     fn get(&self) -> <Example as Get>::Value;
   |                      ~~~~~~~~~~~~~~~~~~~~~~~

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0223`.