]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-64130-2-send.no_drop_tracking.stderr
Rollup merge of #105641 - Amanieu:btree_cursor, r=m-ou-se
[rust.git] / tests / ui / async-await / issue-64130-2-send.no_drop_tracking.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/issue-64130-2-send.rs:24:13
3    |
4 LL |     is_send(bar());
5    |             ^^^^^ future returned by `bar` is not `Send`
6    |
7    = note: the trait bound `Unique<Foo>: Send` is not satisfied
8 note: future is not `Send` as this value is used across an await
9   --> $DIR/issue-64130-2-send.rs:18:10
10    |
11 LL |     let x = Box::new(Foo);
12    |         - has type `Box<Foo>` which is not `Send`
13 LL |     baz().await;
14    |          ^^^^^^ await occurs here, with `x` maybe used later
15 LL | }
16    | - `x` is later dropped here
17 note: required by a bound in `is_send`
18   --> $DIR/issue-64130-2-send.rs:14:15
19    |
20 LL | fn is_send<T: Send>(t: T) { }
21    |               ^^^^ required by this bound in `is_send`
22 help: consider borrowing here
23    |
24 LL |     is_send(&bar());
25    |             +
26
27 error: aborting due to previous error
28