Skip to content

Commit 9050b33

Browse files
Add a test
1 parent de66639 commit 9050b33

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Diff for: tests/ui/lint/lint-ctypes-non-recursion-limit.rs

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//@ check-pass
2+
3+
#![recursion_limit = "5"]
4+
#![allow(unused)]
5+
#![deny(improper_ctypes)]
6+
7+
#[repr(C)]
8+
struct F1(*const ());
9+
#[repr(C)]
10+
struct F2(*const ());
11+
#[repr(C)]
12+
struct F3(*const ());
13+
#[repr(C)]
14+
struct F4(*const ());
15+
#[repr(C)]
16+
struct F5(*const ());
17+
#[repr(C)]
18+
struct F6(*const ());
19+
20+
#[repr(C)]
21+
struct B {
22+
f1: F1,
23+
f2: F2,
24+
f3: F3,
25+
f4: F4,
26+
f5: F5,
27+
f6: F6,
28+
}
29+
30+
extern "C" fn foo(_: B) {}
31+
32+
fn main() {}

0 commit comments

Comments
 (0)