File: mut-is-pointer-like.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (71 lines) | stat: -rw-r--r-- 3,338 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes
  --> $DIR/mut-is-pointer-like.rs:6:12
   |
LL | #![feature(async_fn_in_dyn_trait)]
   |            ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #133119 <https://github.com/rust-lang/rust/issues/133119> for more information
   = note: `#[warn(incomplete_features)]` on by default

error[E0038]: the trait `AsyncTrait` is not dyn compatible
  --> $DIR/mut-is-pointer-like.rs:35:16
   |
LL |         let x: Pin<&mut dyn AsyncTrait<Output = ()>> = f;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
   |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
  --> $DIR/mut-is-pointer-like.rs:16:14
   |
LL | trait AsyncTrait {
   |       ---------- this trait is not dyn compatible...
...
LL |     async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output;
   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
   = help: consider moving `async_dispatch` to another trait

error[E0038]: the trait `AsyncTrait` is not dyn compatible
  --> $DIR/mut-is-pointer-like.rs:35:56
   |
LL |         let x: Pin<&mut dyn AsyncTrait<Output = ()>> = f;
   |                                                        ^ `AsyncTrait` is not dyn compatible
   |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
  --> $DIR/mut-is-pointer-like.rs:16:14
   |
LL | trait AsyncTrait {
   |       ---------- this trait is not dyn compatible...
...
LL |     async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output;
   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
   = help: consider moving `async_dispatch` to another trait
   = note: required for the cast from `Pin<&mut {async block@$DIR/mut-is-pointer-like.rs:32:32: 32:37}>` to `Pin<&mut dyn AsyncTrait<Output = ()>>`

error[E0277]: the trait bound `dyn AsyncTrait<Output = ()>: AsyncTrait` is not satisfied
  --> $DIR/mut-is-pointer-like.rs:36:11
   |
LL |         x.async_dispatch().await;
   |           ^^^^^^^^^^^^^^ the trait `AsyncTrait` is not implemented for `dyn AsyncTrait<Output = ()>`

error[E0038]: the trait `AsyncTrait` is not dyn compatible
  --> $DIR/mut-is-pointer-like.rs:36:9
   |
LL |         x.async_dispatch().await;
   |         ^^^^^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
   |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
  --> $DIR/mut-is-pointer-like.rs:16:14
   |
LL | trait AsyncTrait {
   |       ---------- this trait is not dyn compatible...
...
LL |     async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output;
   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
   = help: consider moving `async_dispatch` to another trait

error: aborting due to 4 previous errors; 1 warning emitted

Some errors have detailed explanations: E0038, E0277.
For more information about an error, try `rustc --explain E0038`.