1 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
2 --> $DIR/trailing_empty_array.rs:6:1
4 LL | / struct RarelyUseful {
6 LL | | last: [usize; 0],
10 = note: `-D clippy::trailing-empty-array` implied by `-D warnings`
11 = help: consider annotating `RarelyUseful` with `#[repr(C)]` or another `repr` attribute
13 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
14 --> $DIR/trailing_empty_array.rs:11:1
16 LL | / struct OnlyField {
17 LL | | first_and_last: [usize; 0],
21 = help: consider annotating `OnlyField` with `#[repr(C)]` or another `repr` attribute
23 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
24 --> $DIR/trailing_empty_array.rs:15:1
26 LL | / struct GenericArrayType<T> {
32 = help: consider annotating `GenericArrayType` with `#[repr(C)]` or another `repr` attribute
34 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
35 --> $DIR/trailing_empty_array.rs:21:1
37 LL | / struct OnlyAnotherAttribute {
39 LL | | last: [usize; 0],
43 = help: consider annotating `OnlyAnotherAttribute` with `#[repr(C)]` or another `repr` attribute
45 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
46 --> $DIR/trailing_empty_array.rs:27:1
48 LL | / struct OnlyADeriveAttribute {
50 LL | | last: [usize; 0],
54 = help: consider annotating `OnlyADeriveAttribute` with `#[repr(C)]` or another `repr` attribute
56 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
57 --> $DIR/trailing_empty_array.rs:33:1
59 LL | / struct ZeroSizedWithConst {
61 LL | | last: [usize; ZERO],
65 = help: consider annotating `ZeroSizedWithConst` with `#[repr(C)]` or another `repr` attribute
67 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
68 --> $DIR/trailing_empty_array.rs:42:1
70 LL | / struct ZeroSizedWithConstFunction {
72 LL | | last: [usize; compute_zero()],
76 = help: consider annotating `ZeroSizedWithConstFunction` with `#[repr(C)]` or another `repr` attribute
78 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
79 --> $DIR/trailing_empty_array.rs:50:1
81 LL | / struct ZeroSizedWithConstFunction2 {
83 LL | | last: [usize; compute_zero_from_arg(1)],
87 = help: consider annotating `ZeroSizedWithConstFunction2` with `#[repr(C)]` or another `repr` attribute
89 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
90 --> $DIR/trailing_empty_array.rs:55:1
92 LL | struct ZeroSizedArrayWrapper([usize; 0]);
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 = help: consider annotating `ZeroSizedArrayWrapper` with `#[repr(C)]` or another `repr` attribute
97 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
98 --> $DIR/trailing_empty_array.rs:57:1
100 LL | struct TupleStruct(i32, [usize; 0]);
101 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 = help: consider annotating `TupleStruct` with `#[repr(C)]` or another `repr` attribute
105 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
106 --> $DIR/trailing_empty_array.rs:59:1
108 LL | / struct LotsOfFields {
113 LL | | last: [usize; 0],
117 = help: consider annotating `LotsOfFields` with `#[repr(C)]` or another `repr` attribute
119 error: aborting due to 11 previous errors