summary refs log tree commit diff
path: root/src/test/ui/generator/not-send-sync.stderr
blob: edf7151f7c4b7c26c7943d3e047afc925604f039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
  --> $DIR/not-send-sync.rs:26:5
   |
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:26:17: 30:6 a:&std::cell::Cell<i32> _]`
note: required by `main::assert_send`
  --> $DIR/not-send-sync.rs:17:5
   |
LL |     fn assert_send<T: Send>(_: T) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
  --> $DIR/not-send-sync.rs:19:5
   |
LL |     assert_sync(|| {
   |     ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
   |
   = 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>, ()}]`
note: required by `main::assert_sync`
  --> $DIR/not-send-sync.rs:16:5
   |
LL |     fn assert_sync<T: Sync>(_: T) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.