@@ -8,10 +8,10 @@ LL | #![feature(async_fn_in_dyn_trait)]
88   = note: `#[warn(incomplete_features)]` on by default
99
1010error[E0038]: the trait `AsyncTrait` is not dyn compatible
11-   --> $DIR/wrong-size.rs:21:30 
11+   --> $DIR/wrong-size.rs:21:17 
1212   |
1313LL |     let x: &dyn AsyncTrait = &"hello, world!";
14-    |                              ^^^^^^ ^^^^^^^^^^ `AsyncTrait` is not dyn compatible
14+    |                 ^^^^^^^^^^ `AsyncTrait` is not dyn compatible
1515   |
1616note: for a trait to be dyn compatible it needs to allow building a vtable
1717      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);
2323   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
2424   = help: consider moving `async_dispatch` to another trait
2525   = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
26-    = note: required for the cast from `&&'static str` to `&dyn AsyncTrait`
2726
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
4628
4729For more information about this error, try `rustc --explain E0038`.
0 commit comments