diff options
-rw-r--r-- | libbindgen/tests/expectations/tests/issue-358.rs | 20 | ||||
-rw-r--r-- | libbindgen/tests/headers/issue-358.hpp | 8 |
2 files changed, 28 insertions, 0 deletions
diff --git a/libbindgen/tests/expectations/tests/issue-358.rs b/libbindgen/tests/expectations/tests/issue-358.rs new file mode 100644 index 00000000..1b933d34 --- /dev/null +++ b/libbindgen/tests/expectations/tests/issue-358.rs @@ -0,0 +1,20 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct JS_PersistentRooted<c> { + pub _base: a, + pub _phantom_0: ::std::marker::PhantomData<c>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct a { + pub b: *mut a, +} +impl Clone for a { + fn clone(&self) -> Self { *self } +} diff --git a/libbindgen/tests/headers/issue-358.hpp b/libbindgen/tests/headers/issue-358.hpp new file mode 100644 index 00000000..b14521b7 --- /dev/null +++ b/libbindgen/tests/headers/issue-358.hpp @@ -0,0 +1,8 @@ +// bindgen-flags: -- -std=c++11 +namespace JS { +template <typename> class PersistentRooted; +} +template <typename> class a { a *b; }; +namespace JS { +template <typename c> class PersistentRooted : a<PersistentRooted<c>> {}; +} |