Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 46760b4

Browse files
committed
Update async-fn-nonsend.stderr
1 parent 5feb4d0 commit 46760b4

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed
Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
error: future cannot be sent between threads safely
2-
--> $DIR/async-fn-nonsend.rs:49:17
3-
|
4-
LL | assert_send(local_dropped_before_await());
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send`
6-
|
7-
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
8-
note: future is not `Send` as this value is used across an await
9-
--> $DIR/async-fn-nonsend.rs:24:10
10-
|
11-
LL | let x = non_send();
12-
| - has type `impl Debug` which is not `Send`
13-
LL | drop(x);
14-
LL | fut().await;
15-
| ^^^^^^ await occurs here, with `x` maybe used later
16-
LL | }
17-
| - `x` is later dropped here
18-
note: required by a bound in `assert_send`
19-
--> $DIR/async-fn-nonsend.rs:46:24
20-
|
21-
LL | fn assert_send(_: impl Send) {}
22-
| ^^^^ required by this bound in `assert_send`
23-
24-
error: future cannot be sent between threads safely
25-
--> $DIR/async-fn-nonsend.rs:51:17
2+
--> $DIR/async-fn-nonsend.rs:50:17
263
|
274
LL | assert_send(non_send_temporary_in_match());
285
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
@@ -32,20 +9,20 @@ note: future is not `Send` as this value is used across an await
329
--> $DIR/async-fn-nonsend.rs:33:25
3310
|
3411
LL | match Some(non_send()) {
35-
| ---------- has type `impl Debug` which is not `Send`
12+
| ---------------- has type `Option<impl Debug>` which is not `Send`
3613
LL | Some(_) => fut().await,
37-
| ^^^^^^ await occurs here, with `non_send()` maybe used later
14+
| ^^^^^^ await occurs here, with `Some(non_send())` maybe used later
3815
...
3916
LL | }
40-
| - `non_send()` is later dropped here
17+
| - `Some(non_send())` is later dropped here
4118
note: required by a bound in `assert_send`
4219
--> $DIR/async-fn-nonsend.rs:46:24
4320
|
4421
LL | fn assert_send(_: impl Send) {}
4522
| ^^^^ required by this bound in `assert_send`
4623

4724
error: future cannot be sent between threads safely
48-
--> $DIR/async-fn-nonsend.rs:53:17
25+
--> $DIR/async-fn-nonsend.rs:52:17
4926
|
5027
LL | assert_send(non_sync_with_method_call());
5128
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
@@ -68,5 +45,5 @@ note: required by a bound in `assert_send`
6845
LL | fn assert_send(_: impl Send) {}
6946
| ^^^^ required by this bound in `assert_send`
7047

71-
error: aborting due to 3 previous errors
48+
error: aborting due to 2 previous errors
7249

0 commit comments

Comments
 (0)