2020-05-06 16:49:30 +08:00
|
|
|
error: future cannot be sent between threads safely
|
2022-10-01 12:19:31 +02:00
|
|
|
--> $DIR/issue-70818.rs:7:38
|
2020-05-06 16:49:30 +08:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
2020-05-06 16:49:30 +08:00
|
|
|
|
|
2020-05-07 22:56:17 +08:00
|
|
|
note: captured value is not `Send`
|
2022-10-01 12:19:31 +02:00
|
|
|
--> $DIR/issue-70818.rs:9:18
|
2020-05-06 16:49:30 +08:00
|
|
|
|
|
|
|
|
LL | async { (ty, ty1) }
|
|
|
|
| ^^^ has type `U` which is not `Send`
|
|
|
|
help: consider restricting type parameter `U`
|
|
|
|
|
|
2021-03-30 17:56:39 +08:00
|
|
|
LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
|
2021-06-21 19:07:19 -07:00
|
|
|
| +++++++++++++++++++
|
2020-05-06 16:49:30 +08:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|