]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr
Merge commit '9809f5d21990d9e24b3e9876ea7da756fd4e9def' into libgccjit-codegen
[rust.git] / src / test / ui / typeck / typeck-default-trait-impl-negation-sync.stderr
1 error[E0277]: `MyNotSync` cannot be shared between threads safely
2   --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:15
3    |
4 LL | fn is_sync<T: Sync>() {}
5    |               ---- required by this bound in `is_sync`
6 ...
7 LL |     is_sync::<MyNotSync>();
8    |               ^^^^^^^^^ `MyNotSync` cannot be shared between threads safely
9    |
10    = help: the trait `Sync` is not implemented for `MyNotSync`
11
12 error[E0277]: `UnsafeCell<u8>` cannot be shared between threads safely
13   --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:5
14    |
15 LL | fn is_sync<T: Sync>() {}
16    |               ---- required by this bound in `is_sync`
17 ...
18 LL |     is_sync::<MyTypeWUnsafe>();
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<u8>` cannot be shared between threads safely
20    |
21    = help: within `MyTypeWUnsafe`, the trait `Sync` is not implemented for `UnsafeCell<u8>`
22 note: required because it appears within the type `MyTypeWUnsafe`
23   --> $DIR/typeck-default-trait-impl-negation-sync.rs:21:8
24    |
25 LL | struct MyTypeWUnsafe {
26    |        ^^^^^^^^^^^^^
27
28 error[E0277]: `Managed` cannot be shared between threads safely
29   --> $DIR/typeck-default-trait-impl-negation-sync.rs:39:5
30    |
31 LL | fn is_sync<T: Sync>() {}
32    |               ---- required by this bound in `is_sync`
33 ...
34 LL |     is_sync::<MyTypeManaged>();
35    |     ^^^^^^^^^^^^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely
36    |
37    = help: within `MyTypeManaged`, the trait `Sync` is not implemented for `Managed`
38 note: required because it appears within the type `MyTypeManaged`
39   --> $DIR/typeck-default-trait-impl-negation-sync.rs:25:8
40    |
41 LL | struct MyTypeManaged {
42    |        ^^^^^^^^^^^^^
43
44 error: aborting due to 3 previous errors
45
46 For more information about this error, try `rustc --explain E0277`.