2019-08-19 07:25:06 -05:00
|
|
|
// edition:2018
|
2020-04-07 16:57:26 -05:00
|
|
|
#![feature(async_closure)]
|
2019-08-19 07:25:06 -05:00
|
|
|
fn foo() -> Box<dyn std::future::Future<Output = u32>> {
|
|
|
|
let x = 0u32;
|
|
|
|
Box::new((async || x)())
|
|
|
|
//~^ ERROR E0373
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|