error[E0053]: method `poll` has an incompatible type for trait --> $DIR/bad-self-type.rs:10:13 | LL | fn poll(self, _: &mut Context<'_>) -> Poll<()> { | ^^^^ | | | expected `Pin<&mut MyFuture>`, found `MyFuture` | help: change the self-receiver type to match the trait: `self: Pin<&mut MyFuture>` | = note: expected signature `fn(Pin<&mut MyFuture>, &mut Context<'_>) -> Poll<_>` found signature `fn(MyFuture, &mut Context<'_>) -> Poll<_>` error[E0053]: method `foo` has an incompatible type for trait --> $DIR/bad-self-type.rs:22:18 | LL | fn foo(self: Box) {} | ------^^^^^^^^^ | | | | | expected `MyFuture`, found `Box` | help: change the self-receiver type to match the trait: `self` | note: type in trait --> $DIR/bad-self-type.rs:17:12 | LL | fn foo(self); | ^^^^ = note: expected signature `fn(MyFuture)` found signature `fn(Box)` error[E0053]: method `bar` has an incompatible type for trait --> $DIR/bad-self-type.rs:24:18 | LL | fn bar(self) {} | ^ expected `Option<()>`, found `()` | note: type in trait --> $DIR/bad-self-type.rs:18:21 | LL | fn bar(self) -> Option<()>; | ^^^^^^^^^^ = note: expected signature `fn(MyFuture) -> Option<()>` found signature `fn(MyFuture)` help: change the output type to match the trait | LL | fn bar(self) -> Option<()> {} | +++++++++++++ error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0053`.