]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/async-borrowck-escaping-closure-error.rs
Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
[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 }