]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | error: future cannot be sent between threads safely |
2 | --> $DIR/issue-70818.rs:4:38 | |
3 | | | |
4 | LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send { | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | |
f9f354fc | 6 | | |
f9f354fc XL |
7 | note: captured value is not `Send` |
8 | --> $DIR/issue-70818.rs:6:18 | |
9 | | | |
10 | LL | async { (ty, ty1) } | |
11 | | ^^^ has type `U` which is not `Send` | |
f9f354fc XL |
12 | help: consider restricting type parameter `U` |
13 | | | |
cdc7bbd5 | 14 | LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send { |
94222f64 | 15 | | +++++++++++++++++++ |
f9f354fc XL |
16 | |
17 | error: aborting due to previous error | |
18 |