]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/pin-needed-to-poll.stderr
Rollup merge of #106971 - oli-obk:tait_error, r=davidtwco
[rust.git] / tests / ui / async-await / pin-needed-to-poll.stderr
1 error[E0599]: no method named `poll` found for struct `Sleep` in the current scope
2   --> $DIR/pin-needed-to-poll.rs:42:20
3    |
4 LL | struct Sleep;
5    | ------------ method `poll` not found for this struct
6 ...
7 LL |         self.sleep.poll(cx)
8    |                    ^^^^ method not found in `Sleep`
9   --> $SRC_DIR/core/src/future/future.rs:LL:COL
10    |
11    = note: the method is available for `Pin<&mut Sleep>` here
12    |
13 help: consider wrapping the receiver expression with the appropriate type
14    |
15 LL |         Pin::new(&mut self.sleep).poll(cx)
16    |         +++++++++++++           +
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0599`.