1 error[E0277]: `Cell<i32>` cannot be shared between threads safely
2 --> $DIR/not-send-sync.rs:16:17
7 | | required by a bound introduced by this call
12 | |_____^ `Cell<i32>` cannot be shared between threads safely
14 = help: the trait `Sync` is not implemented for `Cell<i32>`
15 = note: required for `&Cell<i32>` to implement `Send`
16 note: required because it's used within this generator
17 --> $DIR/not-send-sync.rs:16:17
21 note: required by a bound in `assert_send`
22 --> $DIR/not-send-sync.rs:7:23
24 LL | fn assert_send<T: Send>(_: T) {}
25 | ^^^^ required by this bound in `assert_send`
27 error: generator cannot be shared between threads safely
28 --> $DIR/not-send-sync.rs:9:17
33 LL | | let a = Cell::new(2);
36 | |_____^ generator is not `Sync`
38 = help: within `[generator@$DIR/not-send-sync.rs:9:17: 9:19]`, the trait `Sync` is not implemented for `Cell<i32>`
39 note: generator is not `Sync` as this value is used across a yield
40 --> $DIR/not-send-sync.rs:12:9
42 LL | let a = Cell::new(2);
43 | - has type `Cell<i32>` which is not `Sync`
45 | ^^^^^ yield occurs here, with `a` maybe used later
47 | - `a` is later dropped here
48 note: required by a bound in `assert_sync`
49 --> $DIR/not-send-sync.rs:6:23
51 LL | fn assert_sync<T: Sync>(_: T) {}
52 | ^^^^ required by this bound in `assert_sync`
54 error: aborting due to 2 previous errors
56 For more information about this error, try `rustc --explain E0277`.