summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/struct_fields.stderr
blob: 4ca57715b1856092b7624b413f20f4300f124058 (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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
error: field name ends with the struct's name
  --> $DIR/struct_fields.rs:10:5
   |
LL |     field_data1: u8,
   |     ^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::struct-field-names` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::struct_field_names)]`

error: field name starts with the struct's name
  --> $DIR/struct_fields.rs:20:5
   |
LL |     data2_field: u8,
   |     ^^^^^^^^^^^^^^^

error: all fields have the same postfix: `data`
  --> $DIR/struct_fields.rs:25:1
   |
LL | / struct StructData {
LL | |
LL | |     movable_data: u8,
LL | |     fixed_data: u8,
LL | |     invisible_data: u8,
LL | | }
   | |_^
   |
   = help: remove the postfixes

error: all fields have the same prefix: `data`
  --> $DIR/struct_fields.rs:32:1
   |
LL | / struct DataStruct {
LL | |
LL | |     data_movable: u8,
LL | |     data_fixed: u8,
LL | |     data_invisible: u8,
LL | | }
   | |_^
   |
   = help: remove the prefixes

error: all fields have the same prefix: `some_data`
  --> $DIR/struct_fields.rs:39:1
   |
LL | / struct DoublePrefix {
LL | |
LL | |     some_data_a: bool,
LL | |     some_data_b: bool,
LL | |     some_data_c: bool,
LL | | }
   | |_^
   |
   = help: remove the prefixes

error: all fields have the same postfix: `some_data`
  --> $DIR/struct_fields.rs:46:1
   |
LL | / struct DoublePostfix {
LL | |
LL | |     a_some_data: bool,
LL | |     b_some_data: bool,
LL | |     c_some_data: bool,
LL | | }
   | |_^
   |
   = help: remove the postfixes

error: all fields have the same postfix: `someData`
  --> $DIR/struct_fields.rs:54:1
   |
LL | / struct NotSnakeCase {
LL | |
LL | |     a_someData: bool,
LL | |     b_someData: bool,
LL | |     c_someData: bool,
LL | | }
   | |_^
   |
   = help: remove the postfixes

error: all fields have the same prefix: `someData`
  --> $DIR/struct_fields.rs:61:1
   |
LL | / struct NotSnakeCase2 {
LL | |
LL | |     someData_c: bool,
LL | |     someData_b: bool,
LL | |     someData_a_b: bool,
LL | | }
   | |_^
   |
   = help: remove the prefixes

error: all fields have the same prefix: `prefix`
  --> $DIR/struct_fields.rs:74:1
   |
LL | / struct NonCaps {
LL | |
LL | |     prefix_的: u8,
LL | |     prefix_tea: u8,
LL | |     prefix_cake: u8,
LL | | }
   | |_^
   |
   = help: remove the prefixes

error: all fields have the same prefix: `_type`
  --> $DIR/struct_fields.rs:124:5
   |
LL | /     struct DoLint {
LL | |
LL | |         _type_create: u8,
LL | |         _type_read: u8,
LL | |         _type_update: u8,
LL | |         _type_destroy: u8,
LL | |     }
   | |_____^
   |
   = help: remove the prefixes

error: all fields have the same prefix: `__type`
  --> $DIR/struct_fields.rs:132:5
   |
LL | /     struct DoLint2 {
LL | |
LL | |         __type_create: u8,
LL | |         __type_read: u8,
LL | |         __type_update: u8,
LL | |         __type_destroy: u8,
LL | |     }
   | |_____^
   |
   = help: remove the prefixes

error: all fields have the same prefix: `___type`
  --> $DIR/struct_fields.rs:140:5
   |
LL | /     struct DoLint3 {
LL | |
LL | |         ___type_create: u8,
LL | |         ___type_read: u8,
LL | |         ___type_update: u8,
LL | |         ___type_destroy: u8,
LL | |     }
   | |_____^
   |
   = help: remove the prefixes

error: all fields have the same postfix: `_`
  --> $DIR/struct_fields.rs:148:5
   |
LL | /     struct DoLint4 {
LL | |
LL | |         create_: u8,
LL | |         read_: u8,
LL | |         update_: u8,
LL | |         destroy_: u8,
LL | |     }
   | |_____^
   |
   = help: remove the postfixes

error: all fields have the same postfix: `__`
  --> $DIR/struct_fields.rs:156:5
   |
LL | /     struct DoLint5 {
LL | |
LL | |         create__: u8,
LL | |         read__: u8,
LL | |         update__: u8,
LL | |         destroy__: u8,
LL | |     }
   | |_____^
   |
   = help: remove the postfixes

error: all fields have the same postfix: `___`
  --> $DIR/struct_fields.rs:164:5
   |
LL | /     struct DoLint6 {
LL | |
LL | |         create___: u8,
LL | |         read___: u8,
LL | |         update___: u8,
LL | |         destroy___: u8,
LL | |     }
   | |_____^
   |
   = help: remove the postfixes

error: all fields have the same postfix: `type`
  --> $DIR/struct_fields.rs:172:5
   |
LL | /     struct DoLintToo {
LL | |
LL | |         _create_type: u8,
LL | |         _update_type: u8,
LL | |         _delete_type: u8,
LL | |     }
   | |_____^
   |
   = help: remove the postfixes

error: field name starts with the struct's name
  --> $DIR/struct_fields.rs:210:5
   |
LL |     proxy: i32,
   |     ^^^^^^^^^^

error: all fields have the same prefix: `some`
  --> $DIR/struct_fields.rs:226:13
   |
LL | /             struct MacroStruct {
LL | |                 some_a: i32,
LL | |                 some_b: i32,
LL | |                 some_c: i32,
LL | |             }
   | |_____________^
...
LL |       mk_struct!();
   |       ------------ in this macro invocation
   |
   = help: remove the prefixes
   = note: this error originates in the macro `mk_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error: field name starts with the struct's name
  --> $DIR/struct_fields.rs:239:17
   |
LL |                 macrobaz_a: i32,
   |                 ^^^^^^^^^^^^^^^
...
LL |     mk_struct2!();
   |     ------------- in this macro invocation
   |
   = note: this error originates in the macro `mk_struct2` (in Nightly builds, run with -Z macro-backtrace for more info)

error: field name starts with the struct's name
  --> $DIR/struct_fields.rs:251:17
   |
LL |                 $field: i32,
   |                 ^^^^^^^^^^^
...
LL |     mk_struct_with_names!(Foo, foo);
   |     ------------------------------- in this macro invocation
   |
   = note: this error originates in the macro `mk_struct_with_names` (in Nightly builds, run with -Z macro-backtrace for more info)

error: all fields have the same prefix: `some`
  --> $DIR/struct_fields.rs:291:13
   |
LL | /             struct $struct_name {
LL | |                 $field1: i32,
LL | |                 $field2: i32,
LL | |                 $field3: i32,
LL | |             }
   | |_____________^
...
LL |       mk_struct_full_def!(PrefixData, some_data, some_meta, some_other);
   |       ----------------------------------------------------------------- in this macro invocation
   |
   = help: remove the prefixes
   = note: this error originates in the macro `mk_struct_full_def` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 21 previous errors