]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issue-68112.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / async-await / issue-68112.stderr
CommitLineData
ba9703b0
XL
1error: future cannot be sent between threads safely
2 --> $DIR/issue-68112.rs:34:5
3 |
ba9703b0
XL
4LL | require_send(send_fut);
5 | ^^^^^^^^^^^^ future created by async block is not `Send`
6 |
1b1a35ee 7 = help: the trait `Sync` is not implemented for `RefCell<i32>`
ba9703b0
XL
8note: future is not `Send` as it awaits another future which is not `Send`
9 --> $DIR/issue-68112.rs:31:17
10 |
11LL | let _ = non_send_fut.await;
3c0e092e 12 | ^^^^^^^^^^^^ await occurs here on type `impl Future<Output = Arc<RefCell<i32>>>`, which is not `Send`
94222f64
XL
13note: required by a bound in `require_send`
14 --> $DIR/issue-68112.rs:11:25
15 |
16LL | fn require_send(_: impl Send) {}
17 | ^^^^ required by this bound in `require_send`
ba9703b0
XL
18
19error: future cannot be sent between threads safely
20 --> $DIR/issue-68112.rs:43:5
21 |
ba9703b0
XL
22LL | require_send(send_fut);
23 | ^^^^^^^^^^^^ future created by async block is not `Send`
24 |
1b1a35ee 25 = help: the trait `Sync` is not implemented for `RefCell<i32>`
ba9703b0
XL
26note: future is not `Send` as it awaits another future which is not `Send`
27 --> $DIR/issue-68112.rs:40:17
28 |
29LL | let _ = make_non_send_future1().await;
3c0e092e 30 | ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl Future<Output = Arc<RefCell<i32>>>`, which is not `Send`
94222f64
XL
31note: required by a bound in `require_send`
32 --> $DIR/issue-68112.rs:11:25
33 |
34LL | fn require_send(_: impl Send) {}
35 | ^^^^ required by this bound in `require_send`
ba9703b0 36
1b1a35ee 37error[E0277]: `RefCell<i32>` cannot be shared between threads safely
ba9703b0
XL
38 --> $DIR/issue-68112.rs:60:5
39 |
ba9703b0 40LL | require_send(send_fut);
1b1a35ee
XL
41 | ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
42 |
43 = help: the trait `Sync` is not implemented for `RefCell<i32>`
44 = note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
923072b8
FG
45note: required because it's used within this `async fn` body
46 --> $DIR/issue-68112.rs:47:31
47 |
48LL | async fn ready2<T>(t: T) -> T { t }
49 | ^^^^^
50note: required because it appears within the type `impl Future<Output = Arc<RefCell<i32>>>`
51 --> $DIR/issue-68112.rs:48:31
52 |
53LL | fn make_non_send_future2() -> impl Future<Output = Arc<RefCell<i32>>> {
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55 = note: required because it captures the following types: `ResumeTy`, `impl Future<Output = Arc<RefCell<i32>>>`, `()`, `i32`, `Ready<i32>`
56note: required because it's used within this `async` block
57 --> $DIR/issue-68112.rs:55:26
58 |
59LL | let send_fut = async {
60 | __________________________^
61LL | | let non_send_fut = make_non_send_future2();
62LL | | let _ = non_send_fut.await;
63LL | | ready(0).await;
64LL | | };
65 | |_____^
94222f64
XL
66note: required by a bound in `require_send`
67 --> $DIR/issue-68112.rs:11:25
68 |
69LL | fn require_send(_: impl Send) {}
70 | ^^^^ required by this bound in `require_send`
ba9703b0
XL
71
72error: aborting due to 3 previous errors
73
74For more information about this error, try `rustc --explain E0277`.