]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/trailing_empty_array.stderr
Rollup merge of #88375 - joshlf:patch-3, r=dtolnay
[rust.git] / src / tools / clippy / tests / ui / trailing_empty_array.stderr
1 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
2   --> $DIR/trailing_empty_array.rs:5:1
3    |
4 LL | / struct RarelyUseful {
5 LL | |     field: i32,
6 LL | |     last: [usize; 0],
7 LL | | }
8    | |_^
9    |
10    = note: `-D clippy::trailing-empty-array` implied by `-D warnings`
11    = help: consider annotating `RarelyUseful` with `#[repr(C)]` or another `repr` attribute
12
13 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
14   --> $DIR/trailing_empty_array.rs:10:1
15    |
16 LL | / struct OnlyField {
17 LL | |     first_and_last: [usize; 0],
18 LL | | }
19    | |_^
20    |
21    = help: consider annotating `OnlyField` with `#[repr(C)]` or another `repr` attribute
22
23 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
24   --> $DIR/trailing_empty_array.rs:14:1
25    |
26 LL | / struct GenericArrayType<T> {
27 LL | |     field: i32,
28 LL | |     last: [T; 0],
29 LL | | }
30    | |_^
31    |
32    = help: consider annotating `GenericArrayType` with `#[repr(C)]` or another `repr` attribute
33
34 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
35   --> $DIR/trailing_empty_array.rs:20:1
36    |
37 LL | / struct OnlyAnotherAttribute {
38 LL | |     field: i32,
39 LL | |     last: [usize; 0],
40 LL | | }
41    | |_^
42    |
43    = help: consider annotating `OnlyAnotherAttribute` with `#[repr(C)]` or another `repr` attribute
44
45 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
46   --> $DIR/trailing_empty_array.rs:26:1
47    |
48 LL | / struct OnlyADeriveAttribute {
49 LL | |     field: i32,
50 LL | |     last: [usize; 0],
51 LL | | }
52    | |_^
53    |
54    = help: consider annotating `OnlyADeriveAttribute` with `#[repr(C)]` or another `repr` attribute
55
56 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
57   --> $DIR/trailing_empty_array.rs:32:1
58    |
59 LL | / struct ZeroSizedWithConst {
60 LL | |     field: i32,
61 LL | |     last: [usize; ZERO],
62 LL | | }
63    | |_^
64    |
65    = help: consider annotating `ZeroSizedWithConst` with `#[repr(C)]` or another `repr` attribute
66
67 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
68   --> $DIR/trailing_empty_array.rs:41:1
69    |
70 LL | / struct ZeroSizedWithConstFunction {
71 LL | |     field: i32,
72 LL | |     last: [usize; compute_zero()],
73 LL | | }
74    | |_^
75    |
76    = help: consider annotating `ZeroSizedWithConstFunction` with `#[repr(C)]` or another `repr` attribute
77
78 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
79   --> $DIR/trailing_empty_array.rs:49:1
80    |
81 LL | / struct ZeroSizedWithConstFunction2 {
82 LL | |     field: i32,
83 LL | |     last: [usize; compute_zero_from_arg(1)],
84 LL | | }
85    | |_^
86    |
87    = help: consider annotating `ZeroSizedWithConstFunction2` with `#[repr(C)]` or another `repr` attribute
88
89 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
90   --> $DIR/trailing_empty_array.rs:54:1
91    |
92 LL | struct ZeroSizedArrayWrapper([usize; 0]);
93    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94    |
95    = help: consider annotating `ZeroSizedArrayWrapper` with `#[repr(C)]` or another `repr` attribute
96
97 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
98   --> $DIR/trailing_empty_array.rs:56:1
99    |
100 LL | struct TupleStruct(i32, [usize; 0]);
101    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102    |
103    = help: consider annotating `TupleStruct` with `#[repr(C)]` or another `repr` attribute
104
105 error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
106   --> $DIR/trailing_empty_array.rs:58:1
107    |
108 LL | / struct LotsOfFields {
109 LL | |     f1: u32,
110 LL | |     f2: u32,
111 LL | |     f3: u32,
112 ...  |
113 LL | |     last: [usize; 0],
114 LL | | }
115    | |_^
116    |
117    = help: consider annotating `LotsOfFields` with `#[repr(C)]` or another `repr` attribute
118
119 error: aborting due to 11 previous errors
120