]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/drop-track-field-assign-nonsend.stderr
remove [async output] from impl Future
[rust.git] / src / test / ui / async-await / drop-track-field-assign-nonsend.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/drop-track-field-assign-nonsend.rs:43:17
3    |
4 LL |     assert_send(agent.handle());
5    |                 ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
6    |
7    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
8 note: future is not `Send` as this value is used across an await
9   --> $DIR/drop-track-field-assign-nonsend.rs:21:38
10    |
11 LL |         let mut info = self.info_result.clone();
12    |             -------- has type `InfoResult` which is not `Send`
13 ...
14 LL |         let _ = send_element(element).await;
15    |                                      ^^^^^^ await occurs here, with `mut info` maybe used later
16 LL |     }
17    |     - `mut info` is later dropped here
18 note: required by a bound in `assert_send`
19   --> $DIR/drop-track-field-assign-nonsend.rs:38:19
20    |
21 LL | fn assert_send<T: Send>(_: T) {}
22    |                   ^^^^ required by this bound in `assert_send`
23
24 error: aborting due to previous error
25