-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.F-arbitrary_self_types`#![feature(arbitrary_self_types)]``#![feature(arbitrary_self_types)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.F-arbitrary_self_types`#![feature(arbitrary_self_types)]``#![feature(arbitrary_self_types)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.