diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-23 17:55:16 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-23 17:55:16 +0100 |
commit | b93faf9015e91303a9cfb14281c1ebe5ca877acd (patch) | |
tree | e08ab5ab12af804ac33a11cf6947f719a13d67e7 | |
parent | ae84a039ce3790091c529ee8ecf767de919659a8 (diff) |
Add test from #358.
-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>> {}; +} |