2020-05-06 16:49:30 +08:00
|
|
|
error: future cannot be sent between threads safely
|
|
|
|
--> $DIR/issue-70818.rs:4:38
|
|
|
|
|
|
|
|
|
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-07 22:56:17 +08:00
|
|
|
note: captured value is not `Send`
|
2020-05-06 16:49:30 +08:00
|
|
|
--> $DIR/issue-70818.rs:6:18
|
|
|
|
|
|
|
|
|
LL | async { (ty, ty1) }
|
|
|
|
| ^^^ has type `U` which is not `Send`
|
|
|
|
help: consider restricting type parameter `U`
|
|
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
LL | fn foo<T: Send, U: Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
|
|
|
|
| ^^^^^^
|
2020-05-06 16:49:30 +08:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|