11error: future cannot be sent between threads safely
2- --> $DIR/issue-68112.rs:34 :18
2+ --> $DIR/issue-68112.rs:37 :18
33 |
44LL | require_send(send_fut);
55 | ^^^^^^^^ future created by async block is not `Send`
66 |
77 = help: the trait `Sync` is not implemented for `RefCell<i32>`
88note: 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
1010 |
1111LL | let _ = non_send_fut.await;
1212 | ^^^^^^^^^^^^ await occurs here on type `impl Future<Output = Arc<RefCell<i32>>>`, which is not `Send`
1313note: required by a bound in `require_send`
14- --> $DIR/issue-68112.rs:11 :25
14+ --> $DIR/issue-68112.rs:14 :25
1515 |
1616LL | fn require_send(_: impl Send) {}
1717 | ^^^^ required by this bound in `require_send`
1818
1919error: future cannot be sent between threads safely
20- --> $DIR/issue-68112.rs:43 :18
20+ --> $DIR/issue-68112.rs:46 :18
2121 |
2222LL | require_send(send_fut);
2323 | ^^^^^^^^ future created by async block is not `Send`
2424 |
2525 = help: the trait `Sync` is not implemented for `RefCell<i32>`
2626note: 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
2828 |
2929LL | let _ = make_non_send_future1().await;
3030 | ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl Future<Output = Arc<RefCell<i32>>>`, which is not `Send`
3131note: required by a bound in `require_send`
32- --> $DIR/issue-68112.rs:11 :25
32+ --> $DIR/issue-68112.rs:14 :25
3333 |
3434LL | fn require_send(_: impl Send) {}
3535 | ^^^^ required by this bound in `require_send`
3636
3737error[E0277]: `RefCell<i32>` cannot be shared between threads safely
38- --> $DIR/issue-68112.rs:60 :18
38+ --> $DIR/issue-68112.rs:65 :18
3939 |
4040LL | require_send(send_fut);
4141 | ------------ ^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
@@ -45,18 +45,21 @@ LL | require_send(send_fut);
4545 = help: the trait `Sync` is not implemented for `RefCell<i32>`
4646 = note: required for `Arc<RefCell<i32>>` to implement `Send`
4747note: required because it's used within this `async fn` body
48- --> $DIR/issue-68112.rs:47 :31
48+ --> $DIR/issue-68112.rs:50 :31
4949 |
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+ | |_^
5255note: 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
5457 |
5558LL | fn make_non_send_future2() -> impl Future<Output = Arc<RefCell<i32>>> {
5659 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5760 = note: required because it captures the following types: `ResumeTy`, `impl Future<Output = Arc<RefCell<i32>>>`, `()`, `i32`, `Ready<i32>`
5861note: required because it's used within this `async` block
59- --> $DIR/issue-68112.rs:55 :26
62+ --> $DIR/issue-68112.rs:60 :26
6063 |
6164LL | let send_fut = async {
6265 | __________________________^
@@ -66,7 +69,7 @@ LL | | ready(0).await;
6669LL | | };
6770 | |_____^
6871note: required by a bound in `require_send`
69- --> $DIR/issue-68112.rs:11 :25
72+ --> $DIR/issue-68112.rs:14 :25
7073 |
7174LL | fn require_send(_: impl Send) {}
7275 | ^^^^ required by this bound in `require_send`
0 commit comments