]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/async-borrowck-escaping-closure-error.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / async-await / async-borrowck-escaping-closure-error.rs
1 // edition:2018
2 #![feature(async_closure)]
3 fn foo() -> Box<dyn std::future::Future<Output = u32>> {
4     let x = 0u32;
5     Box::new((async || x)())
6     //~^ ERROR E0373
7 }
8
9 fn main() {
10 }