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