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 `Pin<&mut MyFuture>`, found `MyFuture`
8 | help: change the self-receiver type to match the trait: `self: Pin<&mut MyFuture>`
10 = note: expected signature `fn(Pin<&mut MyFuture>, &mut Context<'_>) -> Poll<_>`
11 found signature `fn(MyFuture, &mut Context<'_>) -> Poll<_>`
13 error[E0053]: method `foo` has an incompatible type for trait
14 --> $DIR/bad-self-type.rs:22:18
16 LL | fn foo(self: Box<Self>) {}
19 | | expected `MyFuture`, found `Box<MyFuture>`
20 | help: change the self-receiver type to match the trait: `self`
23 --> $DIR/bad-self-type.rs:17:12
27 = note: expected signature `fn(MyFuture)`
28 found signature `fn(Box<MyFuture>)`
30 error[E0053]: method `bar` has an incompatible type for trait
31 --> $DIR/bad-self-type.rs:24:18
34 | ^ expected `Option<()>`, found `()`
37 --> $DIR/bad-self-type.rs:18:21
39 LL | fn bar(self) -> Option<()>;
41 = note: expected signature `fn(MyFuture) -> Option<()>`
42 found signature `fn(MyFuture)`
43 help: change the output type to match the trait
45 LL | fn bar(self) -> Option<()> {}
48 error: aborting due to 3 previous errors
50 For more information about this error, try `rustc --explain E0053`.