1 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
2 --> $DIR/trailing_zero_sized_array_without_repr.rs:6:1
4 LL | / struct RarelyUseful {
6 LL | | last: [usize; 0],
10 = note: `-D clippy::trailing-zero-sized-array-without-repr` implied by `-D warnings`
11 = help: consider annotating the struct definition 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_zero_sized_array_without_repr.rs:11:1
16 LL | / struct OnlyField {
17 LL | | first_and_last: [usize; 0],
21 = help: consider annotating the struct definition 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_zero_sized_array_without_repr.rs:15:1
26 LL | / struct GenericArrayType<T> {
32 = help: consider annotating the struct definition 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_zero_sized_array_without_repr.rs:20:1
38 LL | | struct OnlyAnotherAttributeMustUse {
40 LL | | last: [usize; 0],
44 = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
46 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
47 --> $DIR/trailing_zero_sized_array_without_repr.rs:29:1
49 LL | / struct OnlyAnotherAttributeDerive {
51 LL | | last: [usize; 0],
55 = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
57 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
58 --> $DIR/trailing_zero_sized_array_without_repr.rs:35:1
60 LL | / struct ZeroSizedWithConst {
62 LL | | last: [usize; ZERO],
66 = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
68 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
69 --> $DIR/trailing_zero_sized_array_without_repr.rs:44:1
71 LL | / struct ZeroSizedWithConstFunction {
73 LL | | last: [usize; compute_zero()],
77 = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
79 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
80 --> $DIR/trailing_zero_sized_array_without_repr.rs:49:1
82 LL | struct ZeroSizedArrayWrapper([usize; 0]);
83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85 = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
87 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
88 --> $DIR/trailing_zero_sized_array_without_repr.rs:51:1
90 LL | struct TupleStruct(i32, [usize; 0]);
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93 = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
95 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
96 --> $DIR/trailing_zero_sized_array_without_repr.rs:53:1
98 LL | / struct LotsOfFields {
103 LL | | last: [usize; 0],
107 = help: consider annotating the struct definition with `#[repr(C)]` or another `repr` attribute
109 error: aborting due to 10 previous errors