]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr
Rollup merge of #105641 - Amanieu:btree_cursor, r=m-ou-se
[rust.git] / tests / ui / async-await / issue-64130-1-sync.drop_tracking_mir.stderr
1 error: future cannot be shared between threads safely
2   --> $DIR/issue-64130-1-sync.rs:25:13
3    |
4 LL |     is_sync(bar());
5    |             ^^^^^ future returned by `bar` is not `Sync`
6    |
7    = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
8 note: future is not `Sync` as this value is used across an await
9   --> $DIR/issue-64130-1-sync.rs:18:10
10    |
11 LL |     let x = Foo;
12    |         - has type `Foo` which is not `Sync`
13 LL |     baz().await;
14    |          ^^^^^^ await occurs here, with `x` maybe used later
15 note: required by a bound in `is_sync`
16   --> $DIR/issue-64130-1-sync.rs:14:15
17    |
18 LL | fn is_sync<T: Sync>(t: T) { }
19    |               ^^^^ required by this bound in `is_sync`
20
21 error: aborting due to previous error
22