]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/typeck-unsafe-always-share.stderr
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
[rust.git] / src / test / ui / typeck / typeck-unsafe-always-share.stderr
1 error[E0277]: `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
2   --> $DIR/typeck-unsafe-always-share.rs:19:10
3    |
4 LL |     test(us);
5    |     ---- ^^ `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: the trait `Sync` is not implemented for `UnsafeCell<MySync<{integer}>>`
10 note: required by a bound in `test`
11   --> $DIR/typeck-unsafe-always-share.rs:15:12
12    |
13 LL | fn test<T: Sync>(s: T) {}
14    |            ^^^^ required by this bound in `test`
15
16 error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
17   --> $DIR/typeck-unsafe-always-share.rs:23:10
18    |
19 LL |     test(uns);
20    |     ---- ^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
21    |     |
22    |     required by a bound introduced by this call
23    |
24    = help: the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
25 note: required by a bound in `test`
26   --> $DIR/typeck-unsafe-always-share.rs:15:12
27    |
28 LL | fn test<T: Sync>(s: T) {}
29    |            ^^^^ required by this bound in `test`
30
31 error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
32   --> $DIR/typeck-unsafe-always-share.rs:27:10
33    |
34 LL |     test(ms);
35    |     ---- ^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
36    |     |
37    |     required by a bound introduced by this call
38    |
39    = help: within `MySync<NoSync>`, the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
40 note: required because it appears within the type `MySync<NoSync>`
41   --> $DIR/typeck-unsafe-always-share.rs:8:8
42    |
43 LL | struct MySync<T> {
44    |        ^^^^^^
45 note: required by a bound in `test`
46   --> $DIR/typeck-unsafe-always-share.rs:15:12
47    |
48 LL | fn test<T: Sync>(s: T) {}
49    |            ^^^^ required by this bound in `test`
50
51 error[E0277]: `NoSync` cannot be shared between threads safely
52   --> $DIR/typeck-unsafe-always-share.rs:30:10
53    |
54 LL |     test(NoSync);
55    |     ---- ^^^^^^ `NoSync` cannot be shared between threads safely
56    |     |
57    |     required by a bound introduced by this call
58    |
59    = help: the trait `Sync` is not implemented for `NoSync`
60 note: required by a bound in `test`
61   --> $DIR/typeck-unsafe-always-share.rs:15:12
62    |
63 LL | fn test<T: Sync>(s: T) {}
64    |            ^^^^ required by this bound in `test`
65
66 error: aborting due to 4 previous errors
67
68 For more information about this error, try `rustc --explain E0277`.