File: associated-types-in-ambiguous-context.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (61 lines) | stat: -rw-r--r-- 2,025 bytes parent folder | download | duplicates (3)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:8: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) -> Get::Value {}
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:22:17
   |
LL | trait Foo where Foo::Assoc: Bar {
   |                 ^^^^^^^^^^ help: use fully-qualified syntax: `<Self as Foo>::Assoc`

error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:27:10
   |
LL | type X = std::ops::Deref::Target;
   |          ^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use fully-qualified syntax
   |
LL - type X = std::ops::Deref::Target;
LL + type X = <ByteStr as Deref>::Target;
   |
LL - type X = std::ops::Deref::Target;
LL + type X = <ByteString as Deref>::Target;
   |
LL - type X = std::ops::Deref::Target;
LL + type X = <CString as Deref>::Target;
   |
LL - type X = std::ops::Deref::Target;
LL + type X = <IoSlice<'_> as Deref>::Target;
   |
     and N other candidates

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

error[E0223]: ambiguous associated type
  --> $DIR/associated-types-in-ambiguous-context.rs:16: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) -> Get::Value;
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`.