2021-03-30 20:37:30 +00:00
|
|
|
error[E0277]: `PhantomPinned` cannot be unpinned
|
2021-10-22 20:49:12 +00:00
|
|
|
--> $DIR/pin-needed-to-poll-2.rs:43:18
|
2021-03-30 20:37:30 +00:00
|
|
|
|
|
|
|
|
LL | Pin::new(&mut self.sleep).poll(cx)
|
2024-01-29 18:31:02 +00:00
|
|
|
| -------- ^^^^^^^^^^^^^^^ within `Sleep`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `Sleep: Unpin`
|
2021-10-22 20:49:12 +00:00
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2021-03-30 20:37:30 +00:00
|
|
|
|
|
2023-04-12 22:03:11 +00:00
|
|
|
= note: consider using the `pin!` macro
|
|
|
|
consider using `Box::pin` if you need to access the pinned value outside of the current scope
|
2021-03-30 20:37:30 +00:00
|
|
|
note: required because it appears within the type `Sleep`
|
|
|
|
--> $DIR/pin-needed-to-poll-2.rs:8:8
|
|
|
|
|
|
|
|
|
LL | struct Sleep(std::marker::PhantomPinned);
|
|
|
|
| ^^^^^
|
2023-10-03 11:01:27 +00:00
|
|
|
note: required by a bound in `Pin::<Ptr>::new`
|
2021-07-17 18:13:50 +00:00
|
|
|
--> $SRC_DIR/core/src/pin.rs:LL:COL
|
2021-03-30 20:37:30 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2021-03-30 20:37:30 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|