Skip to content

Commit 43ea46d

Browse files
committed
Add a test case for issue rust-lang#446
1 parent 6d02c71 commit 43ea46d

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tests/expectations/tests/issue-446.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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 List<Elem> {
10+
pub next: *mut List<Elem>,
11+
}
12+
#[repr(C)]
13+
#[derive(Debug, Copy, Clone)]
14+
pub struct PersistentRooted<GcThing> {
15+
pub root_list: List<PersistentRooted<GcThing>>,
16+
}

tests/headers/issue-446.hpp

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// bindgen-flags: -- -std=c++14
2+
3+
template <typename Elem>
4+
class List {
5+
List<Elem> *next;
6+
};
7+
8+
template <typename GcThing>
9+
class PersistentRooted {
10+
List<PersistentRooted<GcThing>> root_list;
11+
};

0 commit comments

Comments
 (0)