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