1
1
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
26
3
|
27
4
LL | assert_send(non_send_temporary_in_match());
28
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
32
9
--> $DIR/async-fn-nonsend.rs:33:25
33
10
|
34
11
LL | match Some(non_send()) {
35
- | ---------- has type `impl Debug` which is not `Send`
12
+ | ---------------- has type `Option< impl Debug> ` which is not `Send`
36
13
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
38
15
...
39
16
LL | }
40
- | - `non_send()` is later dropped here
17
+ | - `Some( non_send() )` is later dropped here
41
18
note: required by a bound in `assert_send`
42
19
--> $DIR/async-fn-nonsend.rs:46:24
43
20
|
44
21
LL | fn assert_send(_: impl Send) {}
45
22
| ^^^^ required by this bound in `assert_send`
46
23
47
24
error: future cannot be sent between threads safely
48
- --> $DIR/async-fn-nonsend.rs:53 :17
25
+ --> $DIR/async-fn-nonsend.rs:52 :17
49
26
|
50
27
LL | assert_send(non_sync_with_method_call());
51
28
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
@@ -68,5 +45,5 @@ note: required by a bound in `assert_send`
68
45
LL | fn assert_send(_: impl Send) {}
69
46
| ^^^^ required by this bound in `assert_send`
70
47
71
- error: aborting due to 3 previous errors
48
+ error: aborting due to 2 previous errors
72
49
0 commit comments