mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
24 lines
486 B
Rust
24 lines
486 B
Rust
//@ check-pass
|
|
//@ edition: 2021
|
|
|
|
// regression test found while working on #117134.
|
|
use std::future;
|
|
|
|
fn main() {
|
|
let mut recv = future::ready(());
|
|
let _combined_fut = async {
|
|
let _ = || read(&mut recv);
|
|
};
|
|
|
|
let _uwu = (String::new(), _combined_fut);
|
|
// Dropping a coroutine as part of a more complex
|
|
// types should not add unnecessary liveness
|
|
// constraints.
|
|
|
|
drop(recv);
|
|
}
|
|
|
|
fn read<F: future::Future>(_: &mut F) -> F::Output {
|
|
todo!()
|
|
}
|