]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/pin-needed-to-poll-2.stderr
Rollup merge of #107203 - chenyukang:yukang/fix-106496-remove-deref, r=compiler-errors
[rust.git] / tests / 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 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0277`.