]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issue-70818.stderr
New upstream version 1.45.0+dfsg1
[rustc.git] / src / test / ui / async-await / issue-70818.stderr
CommitLineData
f9f354fc
XL
1error: future cannot be sent between threads safely
2 --> $DIR/issue-70818.rs:4:38
3 |
4LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
6LL |
7LL | async { (ty, ty1) }
8 | ------------------- this returned value is of type `impl std::future::Future`
9 |
10 = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `U`
11note: captured value is not `Send`
12 --> $DIR/issue-70818.rs:6:18
13 |
14LL | async { (ty, ty1) }
15 | ^^^ has type `U` which is not `Send`
16 = note: the return type of a function must have a statically known size
17help: consider restricting type parameter `U`
18 |
19LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
20 | ^^^^^^^^^^^^^^^^^^^
21
22error: aborting due to previous error
23