You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0107]: missing generics for associated type `Provider::A`
18
+
--> $DIR/issue-71176.rs:10:27
19
+
|
20
+
LL | inner: Box<dyn Provider<A = B>>,
21
+
| ^ expected 1 lifetime argument
22
+
|
23
+
note: associated type defined here, with 1 lifetime parameter: `'a`
24
+
--> $DIR/issue-71176.rs:2:10
25
+
|
26
+
LL | type A<'a>;
27
+
| ^ --
28
+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
29
+
help: add missing lifetime argument
30
+
|
31
+
LL | inner: Box<dyn Provider<A<'a> = B>>,
32
+
| ++++
33
+
34
+
error[E0107]: missing generics for associated type `Provider::A`
35
+
--> $DIR/issue-71176.rs:10:27
36
+
|
37
+
LL | inner: Box<dyn Provider<A = B>>,
38
+
| ^ expected 1 lifetime argument
39
+
|
40
+
note: associated type defined here, with 1 lifetime parameter: `'a`
41
+
--> $DIR/issue-71176.rs:2:10
42
+
|
43
+
LL | type A<'a>;
44
+
| ^ --
45
+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
46
+
help: add missing lifetime argument
47
+
|
48
+
LL | inner: Box<dyn Provider<A<'a> = B>>,
49
+
| ++++
50
+
51
+
error[E0038]: the trait `Provider` cannot be made into an object
52
+
--> $DIR/issue-71176.rs:10:14
53
+
|
54
+
LL | inner: Box<dyn Provider<A = B>>,
55
+
| ^^^^^^^^^^^^^^^^^^^ `Provider` cannot be made into an object
56
+
|
57
+
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
58
+
--> $DIR/issue-71176.rs:2:10
59
+
|
60
+
LL | trait Provider {
61
+
| -------- this trait cannot be made into an object...
62
+
LL | type A<'a>;
63
+
| ^ ...because it contains the generic associated type `A`
64
+
= help: consider moving `A` to another trait
65
+
= help: only type `()` implements the trait, consider using it directly instead
66
+
67
+
error: aborting due to 4 previous errors
18
68
19
-
For more information about this error, try `rustc --explain E0107`.
69
+
Some errors have detailed explanations: E0038, E0107.
70
+
For more information about an error, try `rustc --explain E0038`.
0 commit comments