2020-05-06 16:49:30 +08:00
|
|
|
// 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 {
|
2022-02-14 16:10:22 +00:00
|
|
|
//~^ Error future cannot be sent between threads safely
|
2022-02-16 15:48:46 +00:00
|
|
|
async { (ty, ty1) }
|
2020-04-30 12:15:59 +08:00
|
|
|
}
|
2020-05-05 23:26:33 +08:00
|
|
|
|
|
|
|
fn main() {}
|