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