diff options
-rw-r--r-- | tests/expectations/tests/issue-446.rs | 22 | ||||
-rw-r--r-- | tests/headers/issue-446.hpp | 11 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/expectations/tests/issue-446.rs b/tests/expectations/tests/issue-446.rs new file mode 100644 index 00000000..fa736bcc --- /dev/null +++ b/tests/expectations/tests/issue-446.rs @@ -0,0 +1,22 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct List<Elem> { + pub next: *mut List<Elem>, +} +impl <Elem> Default for List<Elem> { + fn default() -> Self { unsafe { ::std::mem::zeroed() } } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PersistentRooted<GcThing> { + pub root_list: List<PersistentRooted<GcThing>>, +} +impl <GcThing> Default for PersistentRooted<GcThing> { + fn default() -> Self { unsafe { ::std::mem::zeroed() } } +} diff --git a/tests/headers/issue-446.hpp b/tests/headers/issue-446.hpp new file mode 100644 index 00000000..2e09c274 --- /dev/null +++ b/tests/headers/issue-446.hpp @@ -0,0 +1,11 @@ +// bindgen-flags: -- -std=c++14 + +template <typename Elem> +class List { + List<Elem> *next; +}; + +template <typename GcThing> +class PersistentRooted { + List<PersistentRooted<GcThing>> root_list; +}; |