2021-03-29 18:14:44 -07:00
|
|
|
error[E0599]: no method named `poll` found for struct `Sleep` in the current scope
|
|
|
|
--> $DIR/pin-needed-to-poll.rs:42:20
|
|
|
|
|
|
|
|
|
LL | struct Sleep;
|
2022-07-01 16:47:26 -07:00
|
|
|
| ------------ method `poll` not found for this struct
|
2021-03-29 18:14:44 -07:00
|
|
|
...
|
|
|
|
LL | self.sleep.poll(cx)
|
|
|
|
| ^^^^ method not found in `Sleep`
|
2021-06-10 13:52:00 +02:00
|
|
|
|
|
2023-08-09 12:31:36 +00:00
|
|
|
help: consider pinning the expression
|
2021-03-29 18:14:44 -07:00
|
|
|
|
|
2023-08-09 12:31:36 +00:00
|
|
|
LL ~ let mut pinned = std::pin::pin!(self.sleep);
|
|
|
|
LL ~ pinned.as_mut().poll(cx)
|
2021-03-29 18:14:44 -07:00
|
|
|
|
|
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2021-03-29 18:14:44 -07:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|