mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
16 lines
255 B
Rust
16 lines
255 B
Rust
// compile-flags: -Z mir-opt-level=3
|
|
// 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();
|
|
}
|