]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-68112.stderr
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / async-await / issue-68112.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/issue-68112.rs:34:5
3    |
4 LL | fn require_send(_: impl Send) {}
5    |                         ---- required by this bound in `require_send`
6 ...
7 LL |     require_send(send_fut);
8    |     ^^^^^^^^^^^^ future created by async block is not `Send`
9    |
10    = help: the trait `Sync` is not implemented for `RefCell<i32>`
11 note: future is not `Send` as it awaits another future which is not `Send`
12   --> $DIR/issue-68112.rs:31:17
13    |
14 LL |         let _ = non_send_fut.await;
15    |                 ^^^^^^^^^^^^ await occurs here on type `impl Future`, which is not `Send`
16
17 error: future cannot be sent between threads safely
18   --> $DIR/issue-68112.rs:43:5
19    |
20 LL | fn require_send(_: impl Send) {}
21    |                         ---- required by this bound in `require_send`
22 ...
23 LL |     require_send(send_fut);
24    |     ^^^^^^^^^^^^ future created by async block is not `Send`
25    |
26    = help: the trait `Sync` is not implemented for `RefCell<i32>`
27 note: future is not `Send` as it awaits another future which is not `Send`
28   --> $DIR/issue-68112.rs:40:17
29    |
30 LL |         let _ = make_non_send_future1().await;
31    |                 ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl Future`, which is not `Send`
32
33 error[E0277]: `RefCell<i32>` cannot be shared between threads safely
34   --> $DIR/issue-68112.rs:60:5
35    |
36 LL | fn require_send(_: impl Send) {}
37    |                         ---- required by this bound in `require_send`
38 ...
39 LL |     require_send(send_fut);
40    |     ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
41    |
42    = help: the trait `Sync` is not implemented for `RefCell<i32>`
43    = note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
44    = note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:47:31: 47:36 {}]`
45    = note: required because it appears within the type `from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:47:31: 47:36 {}]>`
46    = note: required because it appears within the type `impl Future`
47    = note: required because it appears within the type `impl Future`
48    = note: required because it appears within the type `impl Future`
49    = note: required because it appears within the type `{ResumeTy, impl Future, (), i32, Ready<i32>}`
50    = note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:55:26: 59:6 {ResumeTy, impl Future, (), i32, Ready<i32>}]`
51    = note: required because it appears within the type `from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:55:26: 59:6 {ResumeTy, impl Future, (), i32, Ready<i32>}]>`
52    = note: required because it appears within the type `impl Future`
53
54 error: aborting due to 3 previous errors
55
56 For more information about this error, try `rustc --explain E0277`.