]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generator/print/generator-print-verbose-1.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / generator / print / generator-print-verbose-1.stderr
1 error: generator cannot be sent between threads safely
2 --> $DIR/generator-print-verbose-1.rs:37: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 |
10 = help: the trait `Sync` is not implemented for `RefCell<i32>`
11 note: generator is not `Send` as this value is used across a yield
12 --> $DIR/generator-print-verbose-1.rs:35:9
13 |
14 LL | let _non_send_gen = make_non_send_generator();
15 | ------------- has type `Opaque(DefId(0:34 ~ generator_print_verbose_1[70c9]::make_non_send_generator::{opaque#0}), [])` which is not `Send`
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
21 error[E0277]: `RefCell<i32>` cannot be shared between threads safely
22 --> $DIR/generator-print-verbose-1.rs:56:5
23 |
24 LL | fn require_send(_: impl Send) {}
25 | ---- required by this bound in `require_send`
26 ...
27 LL | require_send(send_gen);
28 | ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
29 |
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>>`
32 = note: required because it appears within the type `[make_gen2<Arc<RefCell<i32>>>::{closure#0} upvar_tys=(Arc<RefCell<i32>>) {()}]`
33 = note: required because it appears within the type `Opaque(DefId(0:39 ~ generator_print_verbose_1[70c9]::make_gen2::{opaque#0}), [std::sync::Arc<std::cell::RefCell<i32>>])`
34 = note: required because it appears within the type `Opaque(DefId(0:42 ~ generator_print_verbose_1[70c9]::make_non_send_generator2::{opaque#0}), [])`
35 = note: required because it appears within the type `{Opaque(DefId(0:42 ~ generator_print_verbose_1[70c9]::make_non_send_generator2::{opaque#0}), []), ()}`
36 = note: required because it appears within the type `[test2::{closure#0} upvar_tys=() {Opaque(DefId(0:42 ~ generator_print_verbose_1[70c9]::make_non_send_generator2::{opaque#0}), []), ()}]`
37
38 error: aborting due to 2 previous errors
39
40 For more information about this error, try `rustc --explain E0277`.