]> git.proxmox.com Git - rustc.git/blob - src/test/ui/rfc-2008-non-exhaustive/auxiliary/structs.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / rfc-2008-non-exhaustive / auxiliary / structs.rs
1 #[derive(Default)]
2 #[non_exhaustive]
3 pub struct NormalStruct {
4 pub first_field: u16,
5 pub second_field: u16,
6 }
7
8 #[non_exhaustive]
9 pub struct UnitStruct;
10
11 #[non_exhaustive]
12 pub struct TupleStruct(pub u16, pub u16);
13
14 #[derive(Debug)]
15 #[non_exhaustive]
16 pub struct FunctionalRecord {
17 pub first_field: u16,
18 pub second_field: u16,
19 pub third_field: bool,
20 }
21
22 impl Default for FunctionalRecord {
23 fn default() -> FunctionalRecord {
24 FunctionalRecord { first_field: 640, second_field: 480, third_field: false }
25 }
26 }
27
28 #[derive(Default)]
29 #[non_exhaustive]
30 pub struct NestedStruct {
31 pub foo: u16,
32 pub bar: NormalStruct,
33 }
34
35 #[derive(Default)]
36 #[non_exhaustive]
37 pub struct MixedVisFields {
38 pub a: u16,
39 pub b: bool,
40 pub(crate) foo: bool,
41 }