]> git.lizzy.rs Git - rust.git/blob - src/test/ui/not-sync.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / not-sync.stderr
1 error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
2   --> $DIR/not-sync.rs:18:5
3    |
4 LL |     test::<Cell<i32>>();
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 by `test`
9   --> $DIR/not-sync.rs:15:1
10    |
11 LL | fn test<T: Sync>() {}
12    | ^^^^^^^^^^^^^^^^^^
13
14 error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely
15   --> $DIR/not-sync.rs:20:5
16    |
17 LL |     test::<RefCell<i32>>();
18    |     ^^^^^^^^^^^^^^^^^^^^ `std::cell::RefCell<i32>` cannot be shared between threads safely
19    |
20    = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
21 note: required by `test`
22   --> $DIR/not-sync.rs:15:1
23    |
24 LL | fn test<T: Sync>() {}
25    | ^^^^^^^^^^^^^^^^^^
26
27 error[E0277]: `std::rc::Rc<i32>` cannot be shared between threads safely
28   --> $DIR/not-sync.rs:23:5
29    |
30 LL |     test::<Rc<i32>>();
31    |     ^^^^^^^^^^^^^^^ `std::rc::Rc<i32>` cannot be shared between threads safely
32    |
33    = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc<i32>`
34 note: required by `test`
35   --> $DIR/not-sync.rs:15:1
36    |
37 LL | fn test<T: Sync>() {}
38    | ^^^^^^^^^^^^^^^^^^
39
40 error[E0277]: `std::rc::Weak<i32>` cannot be shared between threads safely
41   --> $DIR/not-sync.rs:25:5
42    |
43 LL |     test::<Weak<i32>>();
44    |     ^^^^^^^^^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely
45    |
46    = help: the trait `std::marker::Sync` is not implemented for `std::rc::Weak<i32>`
47 note: required by `test`
48   --> $DIR/not-sync.rs:15:1
49    |
50 LL | fn test<T: Sync>() {}
51    | ^^^^^^^^^^^^^^^^^^
52
53 error[E0277]: `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
54   --> $DIR/not-sync.rs:28:5
55    |
56 LL |     test::<Receiver<i32>>();
57    |     ^^^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
58    |
59    = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<i32>`
60 note: required by `test`
61   --> $DIR/not-sync.rs:15:1
62    |
63 LL | fn test<T: Sync>() {}
64    | ^^^^^^^^^^^^^^^^^^
65
66 error[E0277]: `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely
67   --> $DIR/not-sync.rs:30:5
68    |
69 LL |     test::<Sender<i32>>();
70    |     ^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely
71    |
72    = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<i32>`
73 note: required by `test`
74   --> $DIR/not-sync.rs:15:1
75    |
76 LL | fn test<T: Sync>() {}
77    | ^^^^^^^^^^^^^^^^^^
78
79 error: aborting due to 6 previous errors
80
81 For more information about this error, try `rustc --explain E0277`.