]> git.lizzy.rs Git - rust.git/blob - tests/ui/sync/suggest-cell.stderr
Add `rustc_on_unimplemented` on `Sync` for cell types
[rust.git] / tests / ui / sync / suggest-cell.stderr
1 error[E0277]: `Cell<()>` cannot be shared between threads safely
2   --> $DIR/suggest-cell.rs:12:20
3    |
4 LL |     require_sync::<std::cell::Cell<()>>();
5    |                    ^^^^^^^^^^^^^^^^^^^ `Cell<()>` cannot be shared between threads safely
6    |
7    = help: the trait `Sync` is not implemented for `Cell<()>`
8    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock`
9 note: required by a bound in `require_sync`
10   --> $DIR/suggest-cell.rs:1:20
11    |
12 LL | fn require_sync<T: Sync>() {}
13    |                    ^^^^ required by this bound in `require_sync`
14
15 error[E0277]: `Cell<u8>` cannot be shared between threads safely
16   --> $DIR/suggest-cell.rs:17:20
17    |
18 LL |     require_sync::<std::cell::Cell<u8>>();
19    |                    ^^^^^^^^^^^^^^^^^^^ `Cell<u8>` cannot be shared between threads safely
20    |
21    = help: the trait `Sync` is not implemented for `Cell<u8>`
22    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicU8` instead
23 note: required by a bound in `require_sync`
24   --> $DIR/suggest-cell.rs:1:20
25    |
26 LL | fn require_sync<T: Sync>() {}
27    |                    ^^^^ required by this bound in `require_sync`
28
29 error[E0277]: `Cell<i32>` cannot be shared between threads safely
30   --> $DIR/suggest-cell.rs:22:20
31    |
32 LL |     require_sync::<std::cell::Cell<i32>>();
33    |                    ^^^^^^^^^^^^^^^^^^^^ `Cell<i32>` cannot be shared between threads safely
34    |
35    = help: the trait `Sync` is not implemented for `Cell<i32>`
36    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicI32` instead
37 note: required by a bound in `require_sync`
38   --> $DIR/suggest-cell.rs:1:20
39    |
40 LL | fn require_sync<T: Sync>() {}
41    |                    ^^^^ required by this bound in `require_sync`
42
43 error[E0277]: `Cell<bool>` cannot be shared between threads safely
44   --> $DIR/suggest-cell.rs:27:20
45    |
46 LL |     require_sync::<std::cell::Cell<bool>>();
47    |                    ^^^^^^^^^^^^^^^^^^^^^ `Cell<bool>` cannot be shared between threads safely
48    |
49    = help: the trait `Sync` is not implemented for `Cell<bool>`
50    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicBool` instead
51 note: required by a bound in `require_sync`
52   --> $DIR/suggest-cell.rs:1:20
53    |
54 LL | fn require_sync<T: Sync>() {}
55    |                    ^^^^ required by this bound in `require_sync`
56
57 error: aborting due to 4 previous errors
58
59 For more information about this error, try `rustc --explain E0277`.