blob: 620db245d3e57d5b8f599c6b990af827b5980f18 [file] [log] [blame]
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/not-send-sync.rs:16:5
|
LL | fn assert_send<T: Send>(_: T) {}
| ----------- ---- required by this bound in `main::assert_send`
...
LL | assert_send(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::cell::Cell<i32>`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:16:17: 20:6 a:&std::cell::Cell<i32> _]`
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/not-send-sync.rs:9:5
|
LL | fn assert_sync<T: Sync>(_: T) {}
| ----------- ---- required by this bound in `main::assert_sync`
...
LL | assert_sync(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
|
= help: within `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because it appears within the type `{std::cell::Cell<i32>, ()}`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.