Skip to content

Commit 35b7374

Browse files
committed
Add test for issue-68841
1 parent f90e617 commit 35b7374

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/ui/mir/issue-68841.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// compile-flags: -Z mir-opt-level=2
2+
// edition:2018
3+
// build-pass
4+
5+
#![feature(async_closure)]
6+
7+
use std::future::Future;
8+
9+
fn async_closure() -> impl Future<Output = u8> {
10+
(async move || -> u8 { 42 })()
11+
}
12+
13+
fn main() {
14+
let _fut = async_closure();
15+
}

0 commit comments

Comments
 (0)