Add test for issue-68841

This commit is contained in:
Yuki Okushi 2020-10-20 17:07:11 +09:00
parent f90e617305
commit 35b737465c

View file

@ -0,0 +1,15 @@
// compile-flags: -Z mir-opt-level=2
// 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();
}