2021-03-04 07:35:11 -06:00
|
|
|
// compile-flags: -Z mir-opt-level=3
|
2020-10-20 03:07:11 -05:00
|
|
|
// edition:2018
|
|
|
|
// build-pass
|
|
|
|
|
|
|
|
#![feature(async_closure)]
|
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
fn async_closure() -> impl Future<Output = u8> {
|
|
|
|
(async move || -> u8 { 42 })()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _fut = async_closure();
|
|
|
|
}
|