Skip to content

Commit b93faf9

Browse files
committed
Add test from #358.
1 parent ae84a03 commit b93faf9

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(non_snake_case)]
5+
6+
7+
#[repr(C)]
8+
#[derive(Debug, Copy, Clone)]
9+
pub struct JS_PersistentRooted<c> {
10+
pub _base: a,
11+
pub _phantom_0: ::std::marker::PhantomData<c>,
12+
}
13+
#[repr(C)]
14+
#[derive(Debug, Copy)]
15+
pub struct a {
16+
pub b: *mut a,
17+
}
18+
impl Clone for a {
19+
fn clone(&self) -> Self { *self }
20+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// bindgen-flags: -- -std=c++11
2+
namespace JS {
3+
template <typename> class PersistentRooted;
4+
}
5+
template <typename> class a { a *b; };
6+
namespace JS {
7+
template <typename c> class PersistentRooted : a<PersistentRooted<c>> {};
8+
}

0 commit comments

Comments
 (0)