]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/struct_excessive_bools.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / struct_excessive_bools.rs
CommitLineData
f20569fa
XL
1#![warn(clippy::struct_excessive_bools)]
2
3macro_rules! foo {
4 () => {
5 struct MacroFoo {
6 a: bool,
7 b: bool,
8 c: bool,
9 d: bool,
10 }
11 };
12}
13
14foo!();
15
16struct Foo {
17 a: bool,
18 b: bool,
19 c: bool,
20}
21
22struct BadFoo {
23 a: bool,
24 b: bool,
25 c: bool,
26 d: bool,
27}
28
29#[repr(C)]
30struct Bar {
31 a: bool,
32 b: bool,
33 c: bool,
34 d: bool,
35}
36
37fn main() {
38 struct FooFoo {
39 a: bool,
40 b: bool,
41 c: bool,
42 d: bool,
43 }
44}