@@ -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/works.rs:27:34
11
+ --> $DIR/works.rs:27:21
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,59 +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/works.rs:27:16
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/works.rs:14: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[E0038]: the trait `AsyncTrait` is not dyn compatible
46
- --> $DIR/works.rs:28:11
47
- |
48
- LL | x.async_dispatch().await;
49
- | ^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
50
- |
51
- note: for a trait to be dyn compatible it needs to allow building a vtable
52
- for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
53
- --> $DIR/works.rs:14:14
54
- |
55
- LL | trait AsyncTrait {
56
- | ---------- this trait is not dyn compatible...
57
- LL | async fn async_dispatch(&self);
58
- | ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
59
- = help: consider moving `async_dispatch` to another trait
60
- = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
61
-
62
- error[E0038]: the trait `AsyncTrait` is not dyn compatible
63
- --> $DIR/works.rs:28:9
64
- |
65
- LL | x.async_dispatch().await;
66
- | ^^^^^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
67
- |
68
- note: for a trait to be dyn compatible it needs to allow building a vtable
69
- for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
70
- --> $DIR/works.rs:14:14
71
- |
72
- LL | trait AsyncTrait {
73
- | ---------- this trait is not dyn compatible...
74
- LL | async fn async_dispatch(&self);
75
- | ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
76
- = help: consider moving `async_dispatch` to another trait
77
- = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
78
-
79
- error: aborting due to 4 previous errors; 1 warning emitted
27
+ error: aborting due to 1 previous error; 1 warning emitted
80
28
81
29
For more information about this error, try `rustc --explain E0038`.
0 commit comments