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[E0038]: the trait `Trait` cannot be made into an object
1
+
error[E0038]: the trait `Trait` is not dyn compatible
2
2
--> tests/ui/no-attribute-macro.rs:12:12
3
3
|
4
4
12 | let _: &dyn Trait;
5
-
| ^^^^^^^^^^ `Trait` cannot be made into an object
5
+
| ^^^^^^^^^^ `Trait` is not dyn compatible
6
6
|
7
-
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>
7
+
note: for a trait to be dyn compatible it needs to allow building a vtable
8
+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8
9
--> tests/ui/no-attribute-macro.rs:2:14
9
10
|
10
11
1 | pub trait Trait {
11
-
| ----- this trait cannot be made into an object...
12
+
| ----- this trait is not dyn compatible...
12
13
2 | async fn method(&self);
13
14
| ^^^^^^ ...because method `method` is `async`
14
15
= help: consider moving `method` to another trait
15
-
= help: only type `Struct` is seen to implement the trait in this crate, consider using it directly instead
16
-
= note: `Trait` can be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
16
+
= help: only type `Struct` implements `Trait` within this crate; consider using it directly instead.
17
+
= note: `Trait` may be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
0 commit comments