Closed
Description
In the error message below, the first argument of poll
is not named self
.
use core::future::Future;
struct S;
impl Future for S {}
Errors:
Compiling playground v0.0.1 (/playground)
error[E0046]: not all trait items implemented, missing: `Output`, `poll`
--> src/lib.rs:4:1
|
4 | impl Future for S {}
| ^^^^^^^^^^^^^^^^^ missing `Output`, `poll` in implementation
|
= help: implement the missing item: `type Output = Type;`
= help: implement the missing item: `fn poll(_: std::pin::Pin<&mut Self>, _: &mut std::task::Context<'_>) -> std::task::Poll<<Self as std::future::Future>::Output> { unimplemented!() }`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0046`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
@rustbot modify labels: T-compiler, A-diagnostics, C-enhancement, D-papercut, F-arbitrary_self_types.
This issue has been assigned to @Duddino via this comment.