fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
971 B23 linesraw
1error: future cannot be sent between threads safely
2  --> $DIR/issue-86507.rs:17:13
3   |
4LL | /             Box::pin(
5LL | |                 async move {
6LL | |                     let x = x;
7LL | |                 }
8LL | |             )
9   | |_____________^ future created by async block is not `Send`
10   |
11note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
12  --> $DIR/issue-86507.rs:19:29
13   |
14LL |                     let x = x;
15   |                             ^ has type `&T` which is not `Send`, because `T` is not `Sync`
16   = note: required for the cast from `Pin<Box<{async block@$DIR/issue-86507.rs:18:17: 20:18}>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>`
17help: consider further restricting this bound
18   |
19LL |     fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
20   |                                       +++++++++++++++++++
21
22error: aborting due to previous error
23