1 error[E0277]: `Cell<i32>` cannot be shared between threads safely
2 --> $DIR/generator-print-verbose-2.rs:19:5
5 | ^^^^^^^^^^^ `Cell<i32>` cannot be shared between threads safely
7 = help: the trait `Sync` is not implemented for `Cell<i32>`
8 = note: required because of the requirements on the impl of `Send` for `&'_#4r Cell<i32>`
9 note: required because it's used within this generator
10 --> $DIR/generator-print-verbose-2.rs:19:17
19 note: required by a bound in `assert_send`
20 --> $DIR/generator-print-verbose-2.rs:10:23
22 LL | fn assert_send<T: Send>(_: T) {}
23 | ^^^^ required by this bound in `assert_send`
25 error: generator cannot be shared between threads safely
26 --> $DIR/generator-print-verbose-2.rs:12:5
29 | ^^^^^^^^^^^ generator is not `Sync`
31 = help: within `[main::{closure#0} upvar_tys=() {Cell<i32>, ()}]`, the trait `Sync` is not implemented for `Cell<i32>`
32 note: generator is not `Sync` as this value is used across a yield
33 --> $DIR/generator-print-verbose-2.rs:15:9
35 LL | let a = Cell::new(2);
36 | - has type `Cell<i32>` which is not `Sync`
38 | ^^^^^ yield occurs here, with `a` maybe used later
40 | - `a` is later dropped here
41 note: required by a bound in `assert_sync`
42 --> $DIR/generator-print-verbose-2.rs:9:23
44 LL | fn assert_sync<T: Sync>(_: T) {}
45 | ^^^^ required by this bound in `assert_sync`
47 error: aborting due to 2 previous errors
49 For more information about this error, try `rustc --explain E0277`.