rust/tests/ui/async-await/issue-70818.rs
2026-02-09 15:09:43 +08:00

9 lines
219 B
Rust

//@ edition:2018
use std::future::Future;
fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
//~^ ERROR: future cannot be sent between threads safely
async { (ty, ty1) }
}
fn main() {}