diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/async-await/issue-70818.stderr | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/async-await/issue-70818.stderr b/src/test/ui/async-await/issue-70818.stderr new file mode 100644 index 000000000..20109d4d1 --- /dev/null +++ b/src/test/ui/async-await/issue-70818.stderr @@ -0,0 +1,18 @@ +error: future cannot be sent between threads safely + --> $DIR/issue-70818.rs:4:38 + | +LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` + | +note: captured value is not `Send` + --> $DIR/issue-70818.rs:6:18 + | +LL | async { (ty, ty1) } + | ^^^ has type `U` which is not `Send` +help: consider restricting type parameter `U` + | +LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send { + | +++++++++++++++++++ + +error: aborting due to previous error + |