about summary refs log tree commit diff
path: root/tests/ui/mir/issue-68841.rs
blob: 0eed46eb6ca197a9a32dcd81753b7dfafa6e241c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ compile-flags: -Z mir-opt-level=3
//@ edition:2018
//@ build-pass

use std::future::Future;

fn async_closure() -> impl Future<Output = u8> {
    (async move || -> u8 { 42 })()
}

fn main() {
    let _fut = async_closure();
}