summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/trailing_empty_array.stderr
blob: ef7fc24c374fa87527d862b75a66f1b56af4d15d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:5:1
   |
LL | / struct RarelyUseful {
LL | |
LL | |     field: i32,
LL | |     last: [usize; 0],
LL | | }
   | |_^
   |
   = help: consider annotating `RarelyUseful` with `#[repr(C)]` or another `repr` attribute
   = note: `-D clippy::trailing-empty-array` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::trailing_empty_array)]`

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:11:1
   |
LL | / struct OnlyField {
LL | |
LL | |     first_and_last: [usize; 0],
LL | | }
   | |_^
   |
   = help: consider annotating `OnlyField` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:16:1
   |
LL | / struct GenericArrayType<T> {
LL | |
LL | |     field: i32,
LL | |     last: [T; 0],
LL | | }
   | |_^
   |
   = help: consider annotating `GenericArrayType` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:23:1
   |
LL | / struct OnlyAnotherAttribute {
LL | |
LL | |     field: i32,
LL | |     last: [usize; 0],
LL | | }
   | |_^
   |
   = help: consider annotating `OnlyAnotherAttribute` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:30:1
   |
LL | / struct OnlyADeriveAttribute {
LL | |
LL | |     field: i32,
LL | |     last: [usize; 0],
LL | | }
   | |_^
   |
   = help: consider annotating `OnlyADeriveAttribute` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:37:1
   |
LL | / struct ZeroSizedWithConst {
LL | |
LL | |     field: i32,
LL | |     last: [usize; ZERO],
LL | | }
   | |_^
   |
   = help: consider annotating `ZeroSizedWithConst` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:47:1
   |
LL | / struct ZeroSizedWithConstFunction {
LL | |
LL | |     field: i32,
LL | |     last: [usize; compute_zero()],
LL | | }
   | |_^
   |
   = help: consider annotating `ZeroSizedWithConstFunction` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:56:1
   |
LL | / struct ZeroSizedWithConstFunction2 {
LL | |
LL | |     field: i32,
LL | |     last: [usize; compute_zero_from_arg(1)],
LL | | }
   | |_^
   |
   = help: consider annotating `ZeroSizedWithConstFunction2` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:62:1
   |
LL | struct ZeroSizedArrayWrapper([usize; 0]);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider annotating `ZeroSizedArrayWrapper` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:65:1
   |
LL | struct TupleStruct(i32, [usize; 0]);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider annotating `TupleStruct` with `#[repr(C)]` or another `repr` attribute

error: trailing zero-sized array in a struct which is not marked with a `repr` attribute
  --> $DIR/trailing_empty_array.rs:68:1
   |
LL | / struct LotsOfFields {
LL | |
LL | |     f1: u32,
LL | |     f2: u32,
...  |
LL | |     last: [usize; 0],
LL | | }
   | |_^
   |
   = help: consider annotating `LotsOfFields` with `#[repr(C)]` or another `repr` attribute

error: aborting due to 11 previous errors