]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/pin-needed-to-poll-2.stderr
Rollup merge of #102215 - alexcrichton:wasm-link-whole-archive, r=estebank
[rust.git] / src / test / ui / async-await / pin-needed-to-poll-2.stderr
1 error[E0277]: `PhantomPinned` cannot be unpinned
2   --> $DIR/pin-needed-to-poll-2.rs:43:18
3    |
4 LL |         Pin::new(&mut self.sleep).poll(cx)
5    |         -------- ^^^^^^^^^^^^^^^ within `Sleep`, the trait `Unpin` is not implemented for `PhantomPinned`
6    |         |
7    |         required by a bound introduced by this call
8    |
9    = note: consider using `Box::pin`
10 note: required because it appears within the type `Sleep`
11   --> $DIR/pin-needed-to-poll-2.rs:8:8
12    |
13 LL | struct Sleep(std::marker::PhantomPinned);
14    |        ^^^^^
15 note: required by a bound in `Pin::<P>::new`
16   --> $SRC_DIR/core/src/pin.rs:LL:COL
17    |
18 LL | impl<P: Deref<Target: Unpin>> Pin<P> {
19    |                       ^^^^^ required by this bound in `Pin::<P>::new`
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0277`.