]> git.proxmox.com Git - rustc.git/blob - src/test/ui/typeck/typeck-unsafe-always-share.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.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 | fn test<T: Sync>(s: T) {}
5 | ---- required by this bound in `test`
6 ...
7 LL | test(us);
8 | ^^ `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
9 |
10 = help: the trait `Sync` is not implemented for `UnsafeCell<MySync<{integer}>>`
11
12 error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
13 --> $DIR/typeck-unsafe-always-share.rs:23:10
14 |
15 LL | fn test<T: Sync>(s: T) {}
16 | ---- required by this bound in `test`
17 ...
18 LL | test(uns);
19 | ^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
20 |
21 = help: the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
22
23 error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
24 --> $DIR/typeck-unsafe-always-share.rs:27:5
25 |
26 LL | fn test<T: Sync>(s: T) {}
27 | ---- required by this bound in `test`
28 ...
29 LL | test(ms);
30 | ^^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
31 |
32 = help: within `MySync<NoSync>`, the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
33 = note: required because it appears within the type `MySync<NoSync>`
34
35 error[E0277]: `NoSync` cannot be shared between threads safely
36 --> $DIR/typeck-unsafe-always-share.rs:30:10
37 |
38 LL | fn test<T: Sync>(s: T) {}
39 | ---- required by this bound in `test`
40 ...
41 LL | test(NoSync);
42 | ^^^^^^ `NoSync` cannot be shared between threads safely
43 |
44 = help: the trait `Sync` is not implemented for `NoSync`
45
46 error: aborting due to 4 previous errors
47
48 For more information about this error, try `rustc --explain E0277`.