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
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
20
20
21
-
error[E0038]: the trait `Trait` cannot be made into an object
22
-
--> $DIR/not_wf_param_in_rpitit.rs:3:22
23
-
|
24
-
LL | trait Trait<const N: dyn Trait = bar> {
25
-
| ^^^^^^^^^ `Trait` cannot be made into an object
26
-
|
27
-
note: for a trait to be "dyn-compatible" 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>
28
-
--> $DIR/not_wf_param_in_rpitit.rs:9:14
29
-
|
30
-
LL | trait Trait<const N: dyn Trait = bar> {
31
-
| ----- this trait cannot be made into an object...
32
-
...
33
-
LL | async fn a() {}
34
-
| ^ ...because associated function `a` has no `self` parameter
35
-
help: consider turning `a` into a method by giving it a `&self` argument
36
-
|
37
-
LL | async fn a(&self) {}
38
-
| +++++
39
-
help: alternatively, consider constraining `a` so it does not apply to trait objects
40
-
|
41
-
LL | async fn a() where Self: Sized {}
42
-
| +++++++++++++++++
43
-
44
21
error[E0038]: the trait `Trait` cannot be made into an object
45
22
--> $DIR/not_wf_param_in_rpitit.rs:3:13
46
23
|
@@ -88,7 +65,7 @@ help: alternatively, consider constraining `a` so it does not apply to trait obj
88
65
LL | async fn a() where Self: Sized {}
89
66
| +++++++++++++++++
90
67
91
-
error: aborting due to 5 previous errors
68
+
error: aborting due to 4 previous errors
92
69
93
70
Some errors have detailed explanations: E0038, E0391, E0425.
94
71
For more information about an error, try `rustc --explain E0038`.
0 commit comments