]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/async-borrowck-escaping-closure-error.rs
Rollup merge of #107065 - flip1995:clippyup, r=Manishearth
[rust.git] / tests / 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 }