1 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
2 --> $DIR/async-borrowck-escaping-block-error.rs:6:20
4 LL | Box::new(async { x } )
7 | | `x` is borrowed here
8 | may outlive borrowed value `x`
10 note: generator is returned here
11 --> $DIR/async-borrowck-escaping-block-error.rs:4:13
13 LL | fn foo() -> Box<impl std::future::Future<Output = u32>> {
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 help: to force the async block to take ownership of `x` (and any other referenced variables), use the `move` keyword
17 LL | Box::new(async move { x } )
20 error: aborting due to previous error
22 For more information about this error, try `rustc --explain E0373`.