1 mod outside {
2     #[repr(C)]
3     pub struct C {
4         pub a: u8,
5     }
6     unsafe impl cxx::ExternType for C {
7         type Id = cxx::type_id!("C");
8         type Kind = cxx::kind::Opaque;
9     }
10 }
11 
12 #[cxx::bridge]
13 mod ffi {
14     extern "C++" {
15         type C = crate::outside::C;
16     }
17 
18     impl UniquePtr<C> {}
19 }
20 
main()21 fn main() {
22     cxx::UniquePtr::new(outside::C { a: 4 });
23 }
24