1 error[E0277]: `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
2 --> $DIR/typeck-unsafe-always-share.rs:19:10
5 | ---- ^^ `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
7 | required by a bound introduced by this call
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
13 LL | fn test<T: Sync>(s: T) {}
14 | ^^^^ required by this bound in `test`
16 error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
17 --> $DIR/typeck-unsafe-always-share.rs:23:10
20 | ---- ^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
22 | required by a bound introduced by this call
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
28 LL | fn test<T: Sync>(s: T) {}
29 | ^^^^ required by this bound in `test`
31 error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
32 --> $DIR/typeck-unsafe-always-share.rs:27:5
35 | ^^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
37 = help: within `MySync<NoSync>`, the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
38 note: required because it appears within the type `MySync<NoSync>`
39 --> $DIR/typeck-unsafe-always-share.rs:8:8
41 LL | struct MySync<T> {
43 note: required by a bound in `test`
44 --> $DIR/typeck-unsafe-always-share.rs:15:12
46 LL | fn test<T: Sync>(s: T) {}
47 | ^^^^ required by this bound in `test`
49 error[E0277]: `NoSync` cannot be shared between threads safely
50 --> $DIR/typeck-unsafe-always-share.rs:30:10
53 | ---- ^^^^^^ `NoSync` cannot be shared between threads safely
55 | required by a bound introduced by this call
57 = help: the trait `Sync` is not implemented for `NoSync`
58 note: required by a bound in `test`
59 --> $DIR/typeck-unsafe-always-share.rs:15:12
61 LL | fn test<T: Sync>(s: T) {}
62 | ^^^^ required by this bound in `test`
64 error: aborting due to 4 previous errors
66 For more information about this error, try `rustc --explain E0277`.