aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/opaque_autotraits.stderr
blob: 0a797b4605b14b4099b4c002f3f7f804890f38ca (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
error[E0277]: `*const cxx::void` cannot be sent between threads safely
  --> tests/ui/opaque_autotraits.rs:13:19
   |
13 |     assert_send::<ffi::Opaque>();
   |                   ^^^^^^^^^^^ `*const cxx::void` cannot be sent between threads safely
   |
   = help: within `ffi::Opaque`, the trait `Send` is not implemented for `*const cxx::void`, which is required by `ffi::Opaque: Send`
   = note: required because it appears within the type `[*const cxx::void; 0]`
note: required because it appears within the type `cxx::private::Opaque`
  --> src/opaque.rs
   |
   | pub struct Opaque {
   |            ^^^^^^
note: required because it appears within the type `ffi::Opaque`
  --> tests/ui/opaque_autotraits.rs:4:14
   |
4  |         type Opaque;
   |              ^^^^^^
note: required by a bound in `assert_send`
  --> tests/ui/opaque_autotraits.rs:8:19
   |
8  | fn assert_send<T: Send>() {}
   |                   ^^^^ required by this bound in `assert_send`

error[E0277]: `*const cxx::void` cannot be shared between threads safely
  --> tests/ui/opaque_autotraits.rs:14:19
   |
14 |     assert_sync::<ffi::Opaque>();
   |                   ^^^^^^^^^^^ `*const cxx::void` cannot be shared between threads safely
   |
   = help: within `ffi::Opaque`, the trait `Sync` is not implemented for `*const cxx::void`, which is required by `ffi::Opaque: Sync`
   = note: required because it appears within the type `[*const cxx::void; 0]`
note: required because it appears within the type `cxx::private::Opaque`
  --> src/opaque.rs
   |
   | pub struct Opaque {
   |            ^^^^^^
note: required because it appears within the type `ffi::Opaque`
  --> tests/ui/opaque_autotraits.rs:4:14
   |
4  |         type Opaque;
   |              ^^^^^^
note: required by a bound in `assert_sync`
  --> tests/ui/opaque_autotraits.rs:9:19
   |
9  | fn assert_sync<T: Sync>() {}
   |                   ^^^^ required by this bound in `assert_sync`

error[E0277]: `PhantomPinned` cannot be unpinned
  --> tests/ui/opaque_autotraits.rs:15:20
   |
15 |     assert_unpin::<ffi::Opaque>();
   |                    ^^^^^^^^^^^ within `ffi::Opaque`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `ffi::Opaque: Unpin`
   |
   = note: consider using the `pin!` macro
           consider using `Box::pin` if you need to access the pinned value outside of the current scope
note: required because it appears within the type `PhantomData<PhantomPinned>`
  --> $RUST/core/src/marker.rs
   |
   | pub struct PhantomData<T: ?Sized>;
   |            ^^^^^^^^^^^
note: required because it appears within the type `cxx::private::Opaque`
  --> src/opaque.rs
   |
   | pub struct Opaque {
   |            ^^^^^^
note: required because it appears within the type `ffi::Opaque`
  --> tests/ui/opaque_autotraits.rs:4:14
   |
4  |         type Opaque;
   |              ^^^^^^
note: required by a bound in `assert_unpin`
  --> tests/ui/opaque_autotraits.rs:10:20
   |
10 | fn assert_unpin<T: Unpin>() {}
   |                    ^^^^^ required by this bound in `assert_unpin`