about summary refs log tree commit diff
path: root/tests/ui/dropck/coroutine-liveness-1.rs
blob: aa9f68a1b49f470bb27b1e8fab902fc758aa500c (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!()
}