1 error[E0277]: `Cell<i32>` cannot be shared between threads safely
2 --> $DIR/not-sync.rs:8:12
4 LL | test::<Cell<i32>>();
5 | ^^^^^^^^^ `Cell<i32>` cannot be shared between threads safely
7 = help: the trait `Sync` is not implemented for `Cell<i32>`
8 = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicI32` instead
9 note: required by a bound in `test`
10 --> $DIR/not-sync.rs:5:12
12 LL | fn test<T: Sync>() {}
13 | ^^^^ required by this bound in `test`
15 error[E0277]: `RefCell<i32>` cannot be shared between threads safely
16 --> $DIR/not-sync.rs:10:12
18 LL | test::<RefCell<i32>>();
19 | ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
21 = help: the trait `Sync` is not implemented for `RefCell<i32>`
22 = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
23 note: required by a bound in `test`
24 --> $DIR/not-sync.rs:5:12
26 LL | fn test<T: Sync>() {}
27 | ^^^^ required by this bound in `test`
29 error[E0277]: `Rc<i32>` cannot be shared between threads safely
30 --> $DIR/not-sync.rs:13:12
32 LL | test::<Rc<i32>>();
33 | ^^^^^^^ `Rc<i32>` cannot be shared between threads safely
35 = help: the trait `Sync` is not implemented for `Rc<i32>`
36 note: required by a bound in `test`
37 --> $DIR/not-sync.rs:5:12
39 LL | fn test<T: Sync>() {}
40 | ^^^^ required by this bound in `test`
42 error[E0277]: `std::rc::Weak<i32>` cannot be shared between threads safely
43 --> $DIR/not-sync.rs:15:12
45 LL | test::<Weak<i32>>();
46 | ^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely
48 = help: the trait `Sync` is not implemented for `std::rc::Weak<i32>`
49 note: required by a bound in `test`
50 --> $DIR/not-sync.rs:5:12
52 LL | fn test<T: Sync>() {}
53 | ^^^^ required by this bound in `test`
55 error[E0277]: `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
56 --> $DIR/not-sync.rs:18:12
58 LL | test::<Receiver<i32>>();
59 | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
61 = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<i32>`
62 note: required by a bound in `test`
63 --> $DIR/not-sync.rs:5:12
65 LL | fn test<T: Sync>() {}
66 | ^^^^ required by this bound in `test`
68 error[E0277]: `Sender<i32>` cannot be shared between threads safely
69 --> $DIR/not-sync.rs:20:12
71 LL | test::<Sender<i32>>();
72 | ^^^^^^^^^^^ `Sender<i32>` cannot be shared between threads safely
74 = help: the trait `Sync` is not implemented for `Sender<i32>`
75 note: required by a bound in `test`
76 --> $DIR/not-sync.rs:5:12
78 LL | fn test<T: Sync>() {}
79 | ^^^^ required by this bound in `test`
81 error: aborting due to 6 previous errors
83 For more information about this error, try `rustc --explain E0277`.