]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-70818.stderr
Rollup merge of #105641 - Amanieu:btree_cursor, r=m-ou-se
[rust.git] / tests / ui / async-await / issue-70818.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/issue-70818.rs:7: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`
6    |
7 note: captured value is not `Send`
8   --> $DIR/issue-70818.rs:9:18
9    |
10 LL |     async { (ty, ty1) }
11    |                  ^^^ has type `U` which is not `Send`
12 help: consider restricting type parameter `U`
13    |
14 LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
15    |                  +++++++++++++++++++
16
17 error: aborting due to previous error
18