summaryrefslogtreecommitdiffstats
path: root/tests/rust/struct_self.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rust/struct_self.rs')
-rw-r--r--tests/rust/struct_self.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rust/struct_self.rs b/tests/rust/struct_self.rs
new file mode 100644
index 0000000..9432082
--- /dev/null
+++ b/tests/rust/struct_self.rs
@@ -0,0 +1,14 @@
+#[repr(C)]
+pub struct Foo<T> {
+ something: *const i32,
+ phantom: std::marker::PhantomData<T>,
+}
+
+#[repr(C)]
+pub struct Bar {
+ something: i32,
+ subexpressions: Foo<Self>,
+}
+
+#[no_mangle]
+pub extern "C" fn root(b: Bar) {}