2018-02-10 23:01:49 -06:00
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
2017-08-09 18:37:56 -05:00
--> $DIR/not-send-sync.rs:26:5
|
2018-02-22 18:42:32 -06:00
LL | assert_send(|| {
2017-08-09 18:37:56 -05:00
| ^^^^^^^^^^^ `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:26:17: 30:6 a:&std::cell::Cell<i32> _]`
2018-01-15 16:26:36 -06:00
note: required by `main::assert_send`
--> $DIR/not-send-sync.rs:17:5
|
2018-02-22 18:42:32 -06:00
LL | fn assert_send<T: Send>(_: T) {}
2018-01-15 16:26:36 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2017-08-09 18:37:56 -05:00
2018-02-10 23:01:49 -06:00
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
2017-08-09 18:37:56 -05:00
--> $DIR/not-send-sync.rs:19:5
|
2018-02-22 18:42:32 -06:00
LL | assert_sync(|| {
2017-08-09 18:37:56 -05:00
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
|
2017-10-07 09:36:28 -05:00
= help: within `[generator@$DIR/not-send-sync.rs:19:17: 23: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:19:17: 23:6 {std::cell::Cell<i32>, ()}]`
2018-01-15 16:26:36 -06:00
note: required by `main::assert_sync`
--> $DIR/not-send-sync.rs:16:5
|
2018-02-22 18:42:32 -06:00
LL | fn assert_sync<T: Sync>(_: T) {}
2018-01-15 16:26:36 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2017-08-09 18:37:56 -05:00
error: aborting due to 2 previous errors
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0277`.