1 error[E0277]: `Cell<i32>` cannot be shared between threads safely
2 --> $DIR/not-send-sync.rs:16:5
4 LL | fn assert_send<T: Send>(_: T) {}
5 | ---- required by this bound in `assert_send`
8 | ^^^^^^^^^^^ `Cell<i32>` cannot be shared between threads safely
10 = help: the trait `Sync` is not implemented for `Cell<i32>`
11 = note: required because of the requirements on the impl of `Send` for `&Cell<i32>`
12 = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:16:17: 20:6]`
14 error: generator cannot be shared between threads safely
15 --> $DIR/not-send-sync.rs:9:5
17 LL | fn assert_sync<T: Sync>(_: T) {}
18 | ---- required by this bound in `assert_sync`
21 | ^^^^^^^^^^^ generator is not `Sync`
23 = help: within `[generator@$DIR/not-send-sync.rs:9:17: 13:6]`, the trait `Sync` is not implemented for `Cell<i32>`
24 note: generator is not `Sync` as this value is used across a yield
25 --> $DIR/not-send-sync.rs:12:9
27 LL | let a = Cell::new(2);
28 | - has type `Cell<i32>` which is not `Sync`
30 | ^^^^^ yield occurs here, with `a` maybe used later
32 | - `a` is later dropped here
34 error: aborting due to 2 previous errors
36 For more information about this error, try `rustc --explain E0277`.