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