1
1
error: future cannot be sent between threads safely
2
- --> $DIR/issue-68112.rs:34 :18
2
+ --> $DIR/issue-68112.rs:37 :18
3
3
|
4
4
LL | require_send(send_fut);
5
5
| ^^^^^^^^ future created by async block is not `Send`
6
6
|
7
7
= help: the trait `Sync` is not implemented for `RefCell<i32>`
8
8
note: future is not `Send` as it awaits another future which is not `Send`
9
- --> $DIR/issue-68112.rs:31 :17
9
+ --> $DIR/issue-68112.rs:34 :17
10
10
|
11
11
LL | let _ = non_send_fut.await;
12
12
| ^^^^^^^^^^^^ await occurs here on type `impl Future<Output = Arc<RefCell<i32>>>`, which is not `Send`
13
13
note: required by a bound in `require_send`
14
- --> $DIR/issue-68112.rs:11 :25
14
+ --> $DIR/issue-68112.rs:14 :25
15
15
|
16
16
LL | fn require_send(_: impl Send) {}
17
17
| ^^^^ required by this bound in `require_send`
18
18
19
19
error: future cannot be sent between threads safely
20
- --> $DIR/issue-68112.rs:43 :18
20
+ --> $DIR/issue-68112.rs:46 :18
21
21
|
22
22
LL | require_send(send_fut);
23
23
| ^^^^^^^^ future created by async block is not `Send`
24
24
|
25
25
= help: the trait `Sync` is not implemented for `RefCell<i32>`
26
26
note: future is not `Send` as it awaits another future which is not `Send`
27
- --> $DIR/issue-68112.rs:40 :17
27
+ --> $DIR/issue-68112.rs:43 :17
28
28
|
29
29
LL | let _ = make_non_send_future1().await;
30
30
| ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl Future<Output = Arc<RefCell<i32>>>`, which is not `Send`
31
31
note: required by a bound in `require_send`
32
- --> $DIR/issue-68112.rs:11 :25
32
+ --> $DIR/issue-68112.rs:14 :25
33
33
|
34
34
LL | fn require_send(_: impl Send) {}
35
35
| ^^^^ required by this bound in `require_send`
36
36
37
37
error[E0277]: `RefCell<i32>` cannot be shared between threads safely
38
- --> $DIR/issue-68112.rs:60 :18
38
+ --> $DIR/issue-68112.rs:65 :18
39
39
|
40
40
LL | require_send(send_fut);
41
41
| ------------ ^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
@@ -45,18 +45,21 @@ LL | require_send(send_fut);
45
45
= help: the trait `Sync` is not implemented for `RefCell<i32>`
46
46
= note: required for `Arc<RefCell<i32>>` to implement `Send`
47
47
note: required because it's used within this `async fn` body
48
- --> $DIR/issue-68112.rs:47 :31
48
+ --> $DIR/issue-68112.rs:50 :31
49
49
|
50
- LL | async fn ready2<T>(t: T) -> T { t }
51
- | ^^^^^
50
+ LL | async fn ready2<T>(t: T) -> T {
51
+ | _______________________________^
52
+ LL | | t
53
+ LL | | }
54
+ | |_^
52
55
note: required because it appears within the type `impl Future<Output = Arc<RefCell<i32>>>`
53
- --> $DIR/issue-68112.rs:48 :31
56
+ --> $DIR/issue-68112.rs:53 :31
54
57
|
55
58
LL | fn make_non_send_future2() -> impl Future<Output = Arc<RefCell<i32>>> {
56
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57
60
= note: required because it captures the following types: `ResumeTy`, `impl Future<Output = Arc<RefCell<i32>>>`, `()`, `i32`, `Ready<i32>`
58
61
note: required because it's used within this `async` block
59
- --> $DIR/issue-68112.rs:55 :26
62
+ --> $DIR/issue-68112.rs:60 :26
60
63
|
61
64
LL | let send_fut = async {
62
65
| __________________________^
@@ -66,7 +69,7 @@ LL | | ready(0).await;
66
69
LL | | };
67
70
| |_____^
68
71
note: required by a bound in `require_send`
69
- --> $DIR/issue-68112.rs:11 :25
72
+ --> $DIR/issue-68112.rs:14 :25
70
73
|
71
74
LL | fn require_send(_: impl Send) {}
72
75
| ^^^^ required by this bound in `require_send`
0 commit comments