Add ui test of opaque type autotraits
diff --git a/tests/ui/opaque_autotraits.rs b/tests/ui/opaque_autotraits.rs
new file mode 100644
index 0000000..4417717
--- /dev/null
+++ b/tests/ui/opaque_autotraits.rs
@@ -0,0 +1,14 @@
+#[cxx::bridge]
+mod ffi {
+    extern "C++" {
+        type Opaque;
+    }
+}
+
+fn assert_send<T: Send>() {}
+fn assert_sync<T: Sync>() {}
+
+fn main() {
+    assert_send::<ffi::Opaque>();
+    assert_sync::<ffi::Opaque>();
+}
diff --git a/tests/ui/opaque_autotraits.stderr b/tests/ui/opaque_autotraits.stderr
new file mode 100644
index 0000000..7a1e226
--- /dev/null
+++ b/tests/ui/opaque_autotraits.stderr
@@ -0,0 +1,27 @@
+error[E0277]: `*const u8` cannot be sent between threads safely
+  --> $DIR/opaque_autotraits.rs:12:5
+   |
+8  | fn assert_send<T: Send>() {}
+   |                   ---- required by this bound in `assert_send`
+...
+12 |     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:13:5
+   |
+9  | fn assert_sync<T: Sync>() {}
+   |                   ---- required by this bound in `assert_sync`
+...
+13 |     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`