]>
Commit | Line | Data |
---|---|---|
0531ce1d | 1 | error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely |
0731742a | 2 | --> $DIR/not-send-sync.rs:16:5 |
ea8adc8c | 3 | | |
0531ce1d | 4 | LL | assert_send(|| { |
ea8adc8c XL |
5 | | ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely |
6 | | | |
7 | = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>` | |
8 | = note: required because of the requirements on the impl of `std::marker::Send` for `&std::cell::Cell<i32>` | |
0731742a | 9 | = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:16:17: 20:6 a:&std::cell::Cell<i32> _]` |
2c00a5a8 | 10 | note: required by `main::assert_send` |
0731742a | 11 | --> $DIR/not-send-sync.rs:7:5 |
2c00a5a8 | 12 | | |
0531ce1d | 13 | LL | fn assert_send<T: Send>(_: T) {} |
2c00a5a8 | 14 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
ea8adc8c | 15 | |
0531ce1d | 16 | error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely |
0731742a | 17 | --> $DIR/not-send-sync.rs:9:5 |
ea8adc8c | 18 | | |
0531ce1d | 19 | LL | assert_sync(|| { |
ea8adc8c XL |
20 | | ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely |
21 | | | |
0731742a | 22 | = 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>` |
2c00a5a8 | 23 | = note: required because it appears within the type `{std::cell::Cell<i32>, ()}` |
0731742a | 24 | = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]` |
2c00a5a8 | 25 | note: required by `main::assert_sync` |
0731742a | 26 | --> $DIR/not-send-sync.rs:6:5 |
2c00a5a8 | 27 | | |
0531ce1d | 28 | LL | fn assert_sync<T: Sync>(_: T) {} |
2c00a5a8 | 29 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
ea8adc8c XL |
30 | |
31 | error: aborting due to 2 previous errors | |
32 | ||
0531ce1d | 33 | For more information about this error, try `rustc --explain E0277`. |