| - this type parameter ----------------------- expected `std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = i32> + std::marker::Send + 'static)>>` because of return type
LL | // We could instead use an `async` block, but this way we have no std spans.
LL | x
| ^
| |
| expected struct `std::pin::Pin`, found type parameter `F`
| help: you need to pin and box this expression: `Box::pin(x)`
| ----------------------- expected `std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = i32> + std::marker::Send + 'static)>>` because of return type
LL | Box::new(x)
| ^^^^^^^^^^^ expected struct `std::pin::Pin`, found struct `std::boxed::Box`
= note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
error[E0277]: `dyn std::future::Future<Output = i32> + std::marker::Send` cannot be unpinned
| ----------------------- expected `std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = i32> + std::marker::Send + 'static)>>` because of return type
LL | / async {
LL | | 42
LL | | }
| |_____^ expected struct `std::pin::Pin`, found opaque type