summaryrefslogtreecommitdiffstats
path: root/tests/ui/dropck/coroutine-liveness-1.rs
blob: aea4d15ad90e2ffd1eae94543e6b3585e663134d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// check-pass
// edition: 2021

// regression test for #116242.
use std::future;

fn main() {
    let mut recv = future::ready(());
    let _combined_fut = async {
        let _ = || read(&mut recv);
    };

    drop(recv);
}

fn read<F: future::Future>(_: &mut F) -> F::Output {
    todo!()
}