fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
874 B22 linesraw
1error: future cannot be sent between threads safely
2  --> $DIR/issue-64130-4-async-move.rs:15:17
3   |
4LL | pub fn foo() -> impl Future + Send {
5   |                 ^^^^^^^^^^^^^^^^^^ future returned by `foo` is not `Send`
6   |
7   = help: the trait `std::marker::Sync` is not implemented for `(dyn std::any::Any + std::marker::Send + 'static)`
8note: future is not `Send` as this value is used across an await
9  --> $DIR/issue-64130-4-async-move.rs:21:26
10   |
11LL |         match client.status() {
12   |               ------ has type `&Client`
13LL |             200 => {
14LL |                 let _x = get().await;
15   |                          ^^^^^^^^^^^ await occurs here, with `client` maybe used later
16...
17LL |     }
18   |     - `client` is later dropped here
19   = note: the return type of a function must have a statically known size
20
21error: aborting due to previous error
22