@@ -8,10 +8,10 @@ LL | #![feature(async_fn_in_dyn_trait)]
8
8
= note: `#[warn(incomplete_features)]` on by default
9
9
10
10
error[E0038]: the trait `AsyncTrait` is not dyn compatible
11
- --> $DIR/wrong-size.rs:21:30
11
+ --> $DIR/wrong-size.rs:21:17
12
12
|
13
13
LL | let x: &dyn AsyncTrait = &"hello, world!";
14
- | ^^^^^^ ^^^^^^^^^^ `AsyncTrait` is not dyn compatible
14
+ | ^^^^^^^^^^ `AsyncTrait` is not dyn compatible
15
15
|
16
16
note: for a trait to be dyn compatible it needs to allow building a vtable
17
17
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
@@ -23,25 +23,7 @@ LL | async fn async_dispatch(&self);
23
23
| ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
24
24
= help: consider moving `async_dispatch` to another trait
25
25
= help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
26
- = note: required for the cast from `&&'static str` to `&dyn AsyncTrait`
27
26
28
- error[E0038]: the trait `AsyncTrait` is not dyn compatible
29
- --> $DIR/wrong-size.rs:21:12
30
- |
31
- LL | let x: &dyn AsyncTrait = &"hello, world!";
32
- | ^^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
33
- |
34
- note: for a trait to be dyn compatible it needs to allow building a vtable
35
- for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
36
- --> $DIR/wrong-size.rs:9:14
37
- |
38
- LL | trait AsyncTrait {
39
- | ---------- this trait is not dyn compatible...
40
- LL | async fn async_dispatch(&self);
41
- | ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
42
- = help: consider moving `async_dispatch` to another trait
43
- = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
44
-
45
- error: aborting due to 2 previous errors; 1 warning emitted
27
+ error: aborting due to 1 previous error; 1 warning emitted
46
28
47
29
For more information about this error, try `rustc --explain E0038`.
0 commit comments