summaryrefslogtreecommitdiff
path: root/libbindgen/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libbindgen/tests')
-rw-r--r--libbindgen/tests/expectations/tests/templateref_opaque.rs20
-rw-r--r--libbindgen/tests/headers/templateref_opaque.hpp11
2 files changed, 31 insertions, 0 deletions
diff --git a/libbindgen/tests/expectations/tests/templateref_opaque.rs b/libbindgen/tests/expectations/tests/templateref_opaque.rs
new file mode 100644
index 00000000..d69254c8
--- /dev/null
+++ b/libbindgen/tests/expectations/tests/templateref_opaque.rs
@@ -0,0 +1,20 @@
+/* automatically generated by rust-bindgen */
+
+
+#![allow(non_snake_case)]
+
+
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct detail_PointerType<T> {
+ pub _address: u8,
+ pub _phantom_0: ::std::marker::PhantomData<T>,
+}
+pub type detail_PointerType_Type<T> = *mut T;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct UniquePtr<T> {
+ pub _address: u8,
+ pub _phantom_0: ::std::marker::PhantomData<T>,
+}
+pub type UniquePtr_Pointer<T> = detail_PointerType<T>;
diff --git a/libbindgen/tests/headers/templateref_opaque.hpp b/libbindgen/tests/headers/templateref_opaque.hpp
new file mode 100644
index 00000000..ca154c34
--- /dev/null
+++ b/libbindgen/tests/headers/templateref_opaque.hpp
@@ -0,0 +1,11 @@
+
+namespace detail {
+template<typename T>
+struct PointerType {
+ typedef T* Type;
+};
+}
+template<typename T>
+class UniquePtr {
+ typedef typename detail::PointerType<T> Pointer;
+};