rust/tests/ui/mir/issue-68841.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
258 B
Rust
Raw Normal View History

//@ compile-flags: -Z mir-opt-level=3
2020-10-20 08:07:11 +00: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();
}