2024-02-16 20:02:50 +00:00
|
|
|
//@ compile-flags: -Z mir-opt-level=3
|
|
|
|
|
//@ edition:2018
|
|
|
|
|
//@ build-pass
|
2020-10-20 17:07:11 +09:00
|
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
|
|
fn async_closure() -> impl Future<Output = u8> {
|
|
|
|
|
(async move || -> u8 { 42 })()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let _fut = async_closure();
|
|
|
|
|
}
|