]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-86507.stderr
Rollup merge of #103570 - lukas-code:stabilize-ilog, r=scottmcm
[rust.git] / src / test / ui / async-await / issue-86507.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/issue-86507.rs:17:13
3    |
4 LL | /             Box::pin(
5 LL | |                 async move {
6 LL | |                     let x = x;
7 LL | |                 }
8 LL | |             )
9    | |_____________^ future created by async block is not `Send`
10    |
11 note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
12   --> $DIR/issue-86507.rs:19:29
13    |
14 LL |                     let x = x;
15    |                             ^ has type `&T` which is not `Send`, because `T` is not `Sync`
16    = note: required for the cast from `impl Future<Output = ()>` to the object type `dyn Future<Output = ()> + Send`
17 help: consider further restricting this bound
18    |
19 LL |     fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
20    |                                       +++++++++++++++++++
21
22 error: aborting due to previous error
23