]> git.proxmox.com Git - rustc.git/blame - tests/ui/async-await/issue-70818.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / async-await / issue-70818.stderr
CommitLineData
f9f354fc 1error: future cannot be sent between threads safely
9ffffee4 2 --> $DIR/issue-70818.rs:7:38
f9f354fc
XL
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`
f9f354fc 6 |
f9f354fc 7note: captured value is not `Send`
9ffffee4 8 --> $DIR/issue-70818.rs:9:18
f9f354fc
XL
9 |
10LL | async { (ty, ty1) }
11 | ^^^ has type `U` which is not `Send`
f9f354fc
XL
12help: consider restricting type parameter `U`
13 |
cdc7bbd5 14LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
94222f64 15 | +++++++++++++++++++
f9f354fc
XL
16
17error: aborting due to previous error
18