1 error[E0277]: `PhantomPinned` cannot be unpinned
2 --> $DIR/pin-needed-to-poll-2.rs:43:18
4 LL | Pin::new(&mut self.sleep).poll(cx)
5 | -------- ^^^^^^^^^^^^^^^ within `Sleep`, the trait `Unpin` is not implemented for `PhantomPinned`
7 | required by a bound introduced by this call
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
13 LL | struct Sleep(std::marker::PhantomPinned);
15 note: required by a bound in `Pin::<P>::new`
16 --> $SRC_DIR/core/src/pin.rs:LL:COL
18 LL | impl<P: Deref<Target: Unpin>> Pin<P> {
19 | ^^^^^ required by this bound in `Pin::<P>::new`
21 error: aborting due to previous error
23 For more information about this error, try `rustc --explain E0277`.