]> git.proxmox.com Git - rustc.git/blob - src/test/ui/not-sync.stderr
New upstream version 1.44.1+dfsg1
[rustc.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:8:12
3 |
4 LL | fn test<T: Sync>() {}
5 | ---- required by this bound in `test`
6 ...
7 LL | test::<Cell<i32>>();
8 | ^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
9 |
10 = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
11
12 error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely
13 --> $DIR/not-sync.rs:10:12
14 |
15 LL | fn test<T: Sync>() {}
16 | ---- required by this bound in `test`
17 ...
18 LL | test::<RefCell<i32>>();
19 | ^^^^^^^^^^^^ `std::cell::RefCell<i32>` cannot be shared between threads safely
20 |
21 = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
22
23 error[E0277]: `std::rc::Rc<i32>` cannot be shared between threads safely
24 --> $DIR/not-sync.rs:13:12
25 |
26 LL | fn test<T: Sync>() {}
27 | ---- required by this bound in `test`
28 ...
29 LL | test::<Rc<i32>>();
30 | ^^^^^^^ `std::rc::Rc<i32>` cannot be shared between threads safely
31 |
32 = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc<i32>`
33
34 error[E0277]: `std::rc::Weak<i32>` cannot be shared between threads safely
35 --> $DIR/not-sync.rs:15:12
36 |
37 LL | fn test<T: Sync>() {}
38 | ---- required by this bound in `test`
39 ...
40 LL | test::<Weak<i32>>();
41 | ^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely
42 |
43 = help: the trait `std::marker::Sync` is not implemented for `std::rc::Weak<i32>`
44
45 error[E0277]: `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
46 --> $DIR/not-sync.rs:18:12
47 |
48 LL | fn test<T: Sync>() {}
49 | ---- required by this bound in `test`
50 ...
51 LL | test::<Receiver<i32>>();
52 | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
53 |
54 = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<i32>`
55
56 error[E0277]: `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely
57 --> $DIR/not-sync.rs:20:12
58 |
59 LL | fn test<T: Sync>() {}
60 | ---- required by this bound in `test`
61 ...
62 LL | test::<Sender<i32>>();
63 | ^^^^^^^^^^^ `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely
64 |
65 = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<i32>`
66
67 error: aborting due to 6 previous errors
68
69 For more information about this error, try `rustc --explain E0277`.