aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/opaque_autotraits.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/opaque_autotraits.stderr')
-rw-r--r--tests/ui/opaque_autotraits.stderr40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/ui/opaque_autotraits.stderr b/tests/ui/opaque_autotraits.stderr
new file mode 100644
index 00000000..4f469eff
--- /dev/null
+++ b/tests/ui/opaque_autotraits.stderr
@@ -0,0 +1,40 @@
+error[E0277]: `*const u8` cannot be sent between threads safely
+ --> $DIR/opaque_autotraits.rs:13:5
+ |
+8 | fn assert_send<T: Send>() {}
+ | ---- required by this bound in `assert_send`
+...
+13 | assert_send::<ffi::Opaque>();
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely
+ |
+ = help: within `ffi::Opaque`, the trait `Send` is not implemented for `*const u8`
+ = note: required because it appears within the type `[*const u8; 0]`
+ = note: required because it appears within the type `cxx::private::Opaque`
+ = note: required because it appears within the type `ffi::Opaque`
+
+error[E0277]: `*const u8` cannot be shared between threads safely
+ --> $DIR/opaque_autotraits.rs:14:5
+ |
+9 | fn assert_sync<T: Sync>() {}
+ | ---- required by this bound in `assert_sync`
+...
+14 | assert_sync::<ffi::Opaque>();
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const u8` cannot be shared between threads safely
+ |
+ = help: within `ffi::Opaque`, the trait `Sync` is not implemented for `*const u8`
+ = note: required because it appears within the type `[*const u8; 0]`
+ = note: required because it appears within the type `cxx::private::Opaque`
+ = note: required because it appears within the type `ffi::Opaque`
+
+error[E0277]: `PhantomPinned` cannot be unpinned
+ --> $DIR/opaque_autotraits.rs:15:5
+ |
+10 | fn assert_unpin<T: Unpin>() {}
+ | ----- required by this bound in `assert_unpin`
+...
+15 | assert_unpin::<ffi::Opaque>();
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ffi::Opaque`, the trait `Unpin` is not implemented for `PhantomPinned`
+ |
+ = 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`