1 error[E0053]: method `poll` has an incompatible type for trait
2 --> $DIR/bad-self-type.rs:10:13
4 LL | fn poll(self, _: &mut Context<'_>) -> Poll<()> {
7 | expected struct `Pin`, found struct `MyFuture`
8 | help: change the self-receiver type to match the trait: `self: Pin<&mut MyFuture>`
10 = note: expected fn pointer `fn(Pin<&mut MyFuture>, &mut Context<'_>) -> Poll<_>`
11 found fn pointer `fn(MyFuture, &mut Context<'_>) -> Poll<_>`
13 error[E0053]: method `foo` has an incompatible type for trait
14 --> $DIR/bad-self-type.rs:22:18
19 LL | fn foo(self: Box<Self>) {}
22 | | expected struct `MyFuture`, found struct `Box`
23 | help: change the self-receiver type to match the trait: `self`
25 = note: expected fn pointer `fn(MyFuture)`
26 found fn pointer `fn(Box<MyFuture>)`
28 error[E0053]: method `bar` has an incompatible type for trait
29 --> $DIR/bad-self-type.rs:24:18
31 LL | fn bar(self) -> Option<()>;
32 | ---------- type in trait
35 | ^ expected enum `Option`, found `()`
37 = note: expected fn pointer `fn(MyFuture) -> Option<()>`
38 found fn pointer `fn(MyFuture)`
39 help: change the output type to match the trait
41 LL | fn bar(self) -> Option<()> {}
44 error: aborting due to 3 previous errors
46 For more information about this error, try `rustc --explain E0053`.