]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | error: generator cannot be sent between threads safely |
2 | --> $DIR/issue-68112.rs:33:5 | |
3 | | | |
4 | LL | fn require_send(_: impl Send) {} | |
5 | | ---- required by this bound in `require_send` | |
6 | ... | |
7 | LL | require_send(send_gen); | |
8 | | ^^^^^^^^^^^^ generator is not `Send` | |
9 | | | |
1b1a35ee | 10 | = help: the trait `Sync` is not implemented for `RefCell<i32>` |
ba9703b0 XL |
11 | note: generator is not `Send` as this value is used across a yield |
12 | --> $DIR/issue-68112.rs:31:9 | |
13 | | | |
14 | LL | let _non_send_gen = make_non_send_generator(); | |
1b1a35ee | 15 | | ------------- has type `impl Generator` which is not `Send` |
ba9703b0 XL |
16 | LL | yield; |
17 | | ^^^^^ yield occurs here, with `_non_send_gen` maybe used later | |
18 | LL | }; | |
19 | | - `_non_send_gen` is later dropped here | |
20 | ||
1b1a35ee | 21 | error[E0277]: `RefCell<i32>` cannot be shared between threads safely |
ba9703b0 XL |
22 | --> $DIR/issue-68112.rs:52:5 |
23 | | | |
24 | LL | fn require_send(_: impl Send) {} | |
25 | | ---- required by this bound in `require_send` | |
26 | ... | |
27 | LL | require_send(send_gen); | |
1b1a35ee | 28 | | ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely |
ba9703b0 | 29 | | |
1b1a35ee XL |
30 | = help: the trait `Sync` is not implemented for `RefCell<i32>` |
31 | = note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>` | |
136023e0 | 32 | = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:38:5: 41:6]` |
1b1a35ee XL |
33 | = note: required because it appears within the type `impl Generator` |
34 | = note: required because it appears within the type `impl Generator` | |
35 | = note: required because it appears within the type `{impl Generator, ()}` | |
136023e0 | 36 | = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:48:20: 51:6]` |
ba9703b0 XL |
37 | |
38 | error: aborting due to 2 previous errors | |
39 | ||
40 | For more information about this error, try `rustc --explain E0277`. |