2022-11-02 19:45:08 -05:00
|
|
|
error: method `foo` should be async because the method from the trait is async
|
2023-03-07 15:26:02 -06:00
|
|
|
--> $DIR/async-example-desugared-boxed.rs:17:5
|
2022-11-02 19:45:08 -05:00
|
|
|
|
|
|
|
|
LL | async fn foo(&self) -> i32;
|
|
|
|
| --------------------------- required because the trait method is async
|
|
|
|
...
|
|
|
|
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|