2021-05-01 21:17:32 +00:00
|
|
|
error[E0277]: `*const cxx::void` cannot be sent between threads safely
|
2022-08-23 06:04:16 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:13:19
|
2020-11-15 22:25:46 +00:00
|
|
|
|
|
2020-12-16 18:18:26 +00:00
|
|
|
13 | assert_send::<ffi::Opaque>();
|
2022-08-23 06:04:16 +00:00
|
|
|
| ^^^^^^^^^^^ `*const cxx::void` cannot be sent between threads safely
|
2020-11-15 22:25:46 +00:00
|
|
|
|
|
2021-05-01 21:17:32 +00:00
|
|
|
= help: within `ffi::Opaque`, the trait `Send` is not implemented for `*const cxx::void`
|
2022-12-30 02:28:28 +00:00
|
|
|
= note: required because it appears within the type `[*const void; 0]`
|
2024-04-02 11:59:25 +00:00
|
|
|
note: required because it appears within the type `Opaque`
|
|
|
|
--> src/opaque.rs
|
|
|
|
|
|
|
|
|
| pub struct Opaque {
|
|
|
|
| ^^^^^^
|
2022-12-30 02:28:28 +00:00
|
|
|
note: required because it appears within the type `Opaque`
|
2021-10-08 06:44:10 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:4:14
|
2021-04-09 01:08:20 +00:00
|
|
|
|
|
|
|
|
4 | type Opaque;
|
|
|
|
| ^^^^^^
|
2021-08-18 02:29:23 +00:00
|
|
|
note: required by a bound in `assert_send`
|
2021-10-08 06:44:10 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:8:19
|
2021-08-18 02:29:23 +00:00
|
|
|
|
|
|
|
|
8 | fn assert_send<T: Send>() {}
|
|
|
|
| ^^^^ required by this bound in `assert_send`
|
2020-11-15 22:25:46 +00:00
|
|
|
|
2021-05-01 21:17:32 +00:00
|
|
|
error[E0277]: `*const cxx::void` cannot be shared between threads safely
|
2022-08-23 06:04:16 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:14:19
|
2020-11-15 22:25:46 +00:00
|
|
|
|
|
2020-12-16 18:18:26 +00:00
|
|
|
14 | assert_sync::<ffi::Opaque>();
|
2022-08-23 06:04:16 +00:00
|
|
|
| ^^^^^^^^^^^ `*const cxx::void` cannot be shared between threads safely
|
2020-11-15 22:25:46 +00:00
|
|
|
|
|
2021-05-01 21:17:32 +00:00
|
|
|
= help: within `ffi::Opaque`, the trait `Sync` is not implemented for `*const cxx::void`
|
2022-12-30 02:28:28 +00:00
|
|
|
= note: required because it appears within the type `[*const void; 0]`
|
2024-04-02 11:59:25 +00:00
|
|
|
note: required because it appears within the type `Opaque`
|
|
|
|
--> src/opaque.rs
|
|
|
|
|
|
|
|
|
| pub struct Opaque {
|
|
|
|
| ^^^^^^
|
2022-12-30 02:28:28 +00:00
|
|
|
note: required because it appears within the type `Opaque`
|
2021-10-08 06:44:10 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:4:14
|
2021-04-09 01:08:20 +00:00
|
|
|
|
|
|
|
|
4 | type Opaque;
|
|
|
|
| ^^^^^^
|
2021-08-18 02:29:23 +00:00
|
|
|
note: required by a bound in `assert_sync`
|
2021-10-08 06:44:10 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:9:19
|
2021-08-18 02:29:23 +00:00
|
|
|
|
|
|
|
|
9 | fn assert_sync<T: Sync>() {}
|
|
|
|
| ^^^^ required by this bound in `assert_sync`
|
2020-11-15 22:32:37 +00:00
|
|
|
|
|
|
|
error[E0277]: `PhantomPinned` cannot be unpinned
|
2022-08-23 06:04:16 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:15:20
|
2020-11-15 22:32:37 +00:00
|
|
|
|
|
2020-12-16 18:18:26 +00:00
|
|
|
15 | assert_unpin::<ffi::Opaque>();
|
2022-08-23 06:04:16 +00:00
|
|
|
| ^^^^^^^^^^^ within `ffi::Opaque`, the trait `Unpin` is not implemented for `PhantomPinned`
|
2020-11-15 22:32:37 +00:00
|
|
|
|
|
2024-04-02 11:59:25 +00:00
|
|
|
= 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 `Opaque`
|
|
|
|
--> src/opaque.rs
|
|
|
|
|
|
|
|
|
| pub struct Opaque {
|
|
|
|
| ^^^^^^
|
2022-12-30 02:28:28 +00:00
|
|
|
note: required because it appears within the type `Opaque`
|
2021-10-08 06:44:10 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:4:14
|
2021-04-09 01:08:20 +00:00
|
|
|
|
|
|
|
|
4 | type Opaque;
|
|
|
|
| ^^^^^^
|
2021-08-18 02:29:23 +00:00
|
|
|
note: required by a bound in `assert_unpin`
|
2021-10-08 06:44:10 +00:00
|
|
|
--> tests/ui/opaque_autotraits.rs:10:20
|
2021-08-18 02:29:23 +00:00
|
|
|
|
|
|
|
|
10 | fn assert_unpin<T: Unpin>() {}
|
|
|
|
| ^^^^^ required by this bound in `assert_unpin`
|