summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr
blob: b9fca1a1b54b81b6e3013fc669cf786a3d635aaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
error[E0277]: `MyNotSync` cannot be shared between threads safely
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:15
   |
LL |     is_sync::<MyNotSync>();
   |               ^^^^^^^^^ `MyNotSync` cannot be shared between threads safely
   |
   = help: the trait `Sync` is not implemented for `MyNotSync`
note: required by a bound in `is_sync`
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
   |
LL | fn is_sync<T: Sync>() {}
   |               ^^^^ required by this bound in `is_sync`

error[E0277]: `UnsafeCell<u8>` cannot be shared between threads safely
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:15
   |
LL |     is_sync::<MyTypeWUnsafe>();
   |               ^^^^^^^^^^^^^ `UnsafeCell<u8>` cannot be shared between threads safely
   |
   = help: within `MyTypeWUnsafe`, the trait `Sync` is not implemented for `UnsafeCell<u8>`
note: required because it appears within the type `MyTypeWUnsafe`
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:21:8
   |
LL | struct MyTypeWUnsafe {
   |        ^^^^^^^^^^^^^
note: required by a bound in `is_sync`
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
   |
LL | fn is_sync<T: Sync>() {}
   |               ^^^^ required by this bound in `is_sync`

error[E0277]: `Managed` cannot be shared between threads safely
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:39:15
   |
LL |     is_sync::<MyTypeManaged>();
   |               ^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely
   |
   = help: within `MyTypeManaged`, the trait `Sync` is not implemented for `Managed`
note: required because it appears within the type `MyTypeManaged`
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:25:8
   |
LL | struct MyTypeManaged {
   |        ^^^^^^^^^^^^^
note: required by a bound in `is_sync`
  --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
   |
LL | fn is_sync<T: Sync>() {}
   |               ^^^^ required by this bound in `is_sync`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.