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