rust/tests/ui/async-await/issue-70818.rs

10 lines
218 B
Rust
Raw Normal View History

//@ edition:2018
2020-04-30 12:15:59 +08:00
2020-05-06 16:49:30 +08:00
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) }
2020-04-30 12:15:59 +08:00
}
fn main() {}