diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-07 18:38:52 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-23 13:34:07 +0000 |
| commit | a626caaad97b7f8733b8c9bd1fe9662cfc1e3ec1 (patch) | |
| tree | 5dba1769b61e7fbf1be8ee5c1fa52878d85f30e7 /tests/ui/async-await/field-assign-nonsend.stderr | |
| parent | ff032043653e7aebfbf74ab59572f929aa2beb65 (diff) | |
| download | rust-a626caaad97b7f8733b8c9bd1fe9662cfc1e3ec1.tar.gz rust-a626caaad97b7f8733b8c9bd1fe9662cfc1e3ec1.zip | |
Revert duplication of tests.
Diffstat (limited to 'tests/ui/async-await/field-assign-nonsend.stderr')
| -rw-r--r-- | tests/ui/async-await/field-assign-nonsend.stderr | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/async-await/field-assign-nonsend.stderr b/tests/ui/async-await/field-assign-nonsend.stderr new file mode 100644 index 00000000000..481b236bbdb --- /dev/null +++ b/tests/ui/async-await/field-assign-nonsend.stderr @@ -0,0 +1,25 @@ +error: future cannot be sent between threads safely + --> $DIR/field-assign-nonsend.rs:42:17 + | +LL | assert_send(agent.handle()); + | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` + | + = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>` +note: future is not `Send` as this value is used across an await + --> $DIR/field-assign-nonsend.rs:20:39 + | +LL | let mut info = self.info_result.clone(); + | -------- has type `InfoResult` which is not `Send` +... +LL | let _ = send_element(element).await; + | ^^^^^ await occurs here, with `mut info` maybe used later +LL | } + | - `mut info` is later dropped here +note: required by a bound in `assert_send` + --> $DIR/field-assign-nonsend.rs:37:19 + | +LL | fn assert_send<T: Send>(_: T) {} + | ^^^^ required by this bound in `assert_send` + +error: aborting due to previous error + |
