third_party_rust_cxx/tests/ui/opaque_autotraits.stderr

54 lines
2.2 KiB
Plaintext
Raw Normal View History

error[E0277]: `*const cxx::void` cannot be sent between threads safely
--> $DIR/opaque_autotraits.rs:13:5
2020-11-15 22:25:46 +00:00
|
8 | fn assert_send<T: Send>() {}
2020-11-15 22:25:46 +00:00
| ---- required by this bound in `assert_send`
...
13 | assert_send::<ffi::Opaque>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const cxx::void` cannot be sent between threads safely
2020-11-15 22:25:46 +00:00
|
= help: within `ffi::Opaque`, the trait `Send` is not implemented for `*const cxx::void`
= note: required because it appears within the type `[*const cxx::void; 0]`
2020-11-15 22:25:46 +00:00
= note: required because it appears within the type `cxx::private::Opaque`
note: required because it appears within the type `ffi::Opaque`
--> $DIR/opaque_autotraits.rs:4:14
|
4 | type Opaque;
| ^^^^^^
2020-11-15 22:25:46 +00:00
error[E0277]: `*const cxx::void` cannot be shared between threads safely
--> $DIR/opaque_autotraits.rs:14:5
2020-11-15 22:25:46 +00:00
|
9 | fn assert_sync<T: Sync>() {}
2020-11-15 22:25:46 +00:00
| ---- required by this bound in `assert_sync`
...
14 | assert_sync::<ffi::Opaque>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const cxx::void` cannot be shared between threads safely
2020-11-15 22:25:46 +00:00
|
= help: within `ffi::Opaque`, the trait `Sync` is not implemented for `*const cxx::void`
= note: required because it appears within the type `[*const cxx::void; 0]`
2020-11-15 22:25:46 +00:00
= note: required because it appears within the type `cxx::private::Opaque`
note: required because it appears within the type `ffi::Opaque`
--> $DIR/opaque_autotraits.rs:4:14
|
4 | type Opaque;
| ^^^^^^
2020-11-15 22:32:37 +00:00
error[E0277]: `PhantomPinned` cannot be unpinned
--> $DIR/opaque_autotraits.rs:15:5
2020-11-15 22:32:37 +00:00
|
10 | fn assert_unpin<T: Unpin>() {}
2020-11-15 22:32:37 +00:00
| ----- required by this bound in `assert_unpin`
...
15 | assert_unpin::<ffi::Opaque>();
2020-11-15 22:32:37 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ffi::Opaque`, the trait `Unpin` is not implemented for `PhantomPinned`
|
= note: consider using `Box::pin`
2020-11-15 22:32:37 +00:00
= note: required because it appears within the type `PhantomData<PhantomPinned>`
= note: required because it appears within the type `cxx::private::Opaque`
note: required because it appears within the type `ffi::Opaque`
--> $DIR/opaque_autotraits.rs:4:14
|
4 | type Opaque;
| ^^^^^^