@@ -124,8 +124,28 @@ LL | optional: () = (),
124
124
= help: add `#![feature(default_field_values)]` to the crate attributes to enable
125
125
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
126
126
127
+ error[E0658]: default values on fields are experimental
128
+ --> $DIR/feature-gate-default-field-values.rs:67:11
129
+ |
130
+ LL | x: i32 = 0,
131
+ | ^^^^
132
+ |
133
+ = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
134
+ = help: add `#![feature(default_field_values)]` to the crate attributes to enable
135
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
136
+
137
+ error[E0658]: default values on fields are experimental
138
+ --> $DIR/feature-gate-default-field-values.rs:68:11
139
+ |
140
+ LL | y: f32 = 0.0,
141
+ | ^^^^^^
142
+ |
143
+ = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information
144
+ = help: add `#![feature(default_field_values)]` to the crate attributes to enable
145
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
146
+
127
147
error[E0797]: base expression required after `..`
128
- --> $DIR/feature-gate-default-field-values.rs:62 :21
148
+ --> $DIR/feature-gate-default-field-values.rs:72 :21
129
149
|
130
150
LL | let x = Foo { .. };
131
151
| ^
@@ -140,7 +160,7 @@ LL | let x = Foo { ../* expr */ };
140
160
| ++++++++++
141
161
142
162
error[E0797]: base expression required after `..`
143
- --> $DIR/feature-gate-default-field-values.rs:64 :29
163
+ --> $DIR/feature-gate-default-field-values.rs:74 :29
144
164
|
145
165
LL | let z = Foo { baz: 1, .. };
146
166
| ^
@@ -155,7 +175,7 @@ LL | let z = Foo { baz: 1, ../* expr */ };
155
175
| ++++++++++
156
176
157
177
error[E0797]: base expression required after `..`
158
- --> $DIR/feature-gate-default-field-values.rs:70 :26
178
+ --> $DIR/feature-gate-default-field-values.rs:80 :26
159
179
|
160
180
LL | let x = Bar::Foo { .. };
161
181
| ^
@@ -170,7 +190,7 @@ LL | let x = Bar::Foo { ../* expr */ };
170
190
| ++++++++++
171
191
172
192
error[E0797]: base expression required after `..`
173
- --> $DIR/feature-gate-default-field-values.rs:72 :34
193
+ --> $DIR/feature-gate-default-field-values.rs:82 :34
174
194
|
175
195
LL | let z = Bar::Foo { baz: 1, .. };
176
196
| ^
@@ -185,7 +205,7 @@ LL | let z = Bar::Foo { baz: 1, ../* expr */ };
185
205
| ++++++++++
186
206
187
207
error[E0797]: base expression required after `..`
188
- --> $DIR/feature-gate-default-field-values.rs:78 :31
208
+ --> $DIR/feature-gate-default-field-values.rs:88 :31
189
209
|
190
210
LL | let x = Qux::<i32, 4> { .. };
191
211
| ^
@@ -200,7 +220,7 @@ LL | let x = Qux::<i32, 4> { ../* expr */ };
200
220
| ++++++++++
201
221
202
222
error[E0797]: base expression required after `..`
203
- --> $DIR/feature-gate-default-field-values.rs:79 :73
223
+ --> $DIR/feature-gate-default-field-values.rs:89 :73
204
224
|
205
225
LL | assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, bay: 4, .. }, x));
206
226
| ^
@@ -215,7 +235,7 @@ LL | assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, bay: 4, ../*
215
235
| ++++++++++
216
236
217
237
error[E0797]: base expression required after `..`
218
- --> $DIR/feature-gate-default-field-values.rs:82 :38
238
+ --> $DIR/feature-gate-default-field-values.rs:92 :38
219
239
|
220
240
LL | let y = Opt { mandatory: None, .. };
221
241
| ^
@@ -230,7 +250,7 @@ LL | let y = Opt { mandatory: None, ../* expr */ };
230
250
| ++++++++++
231
251
232
252
error[E0797]: base expression required after `..`
233
- --> $DIR/feature-gate-default-field-values.rs:86 :47
253
+ --> $DIR/feature-gate-default-field-values.rs:96 :47
234
254
|
235
255
LL | assert!(matches!(Opt { mandatory: None, .. }, z));
236
256
| ^
@@ -245,7 +265,7 @@ LL | assert!(matches!(Opt { mandatory: None, ../* expr */ }, z));
245
265
| ++++++++++
246
266
247
267
error[E0797]: base expression required after `..`
248
- --> $DIR/feature-gate-default-field-values.rs:88 :30
268
+ --> $DIR/feature-gate-default-field-values.rs:98 :30
249
269
|
250
270
LL | assert!(matches!(Opt { .. }, z));
251
271
| ^
@@ -256,7 +276,7 @@ LL | assert!(matches!(Opt { ../* expr */ }, z));
256
276
| ++++++++++
257
277
258
278
error[E0797]: base expression required after `..`
259
- --> $DIR/feature-gate-default-field-values.rs:90 :44
279
+ --> $DIR/feature-gate-default-field-values.rs:100 :44
260
280
|
261
281
LL | assert!(matches!(Opt { optional: (), .. }, z));
262
282
| ^
@@ -267,7 +287,7 @@ LL | assert!(matches!(Opt { optional: (), ../* expr */ }, z));
267
287
| ++++++++++
268
288
269
289
error[E0797]: base expression required after `..`
270
- --> $DIR/feature-gate-default-field-values.rs:92 :61
290
+ --> $DIR/feature-gate-default-field-values.rs:102 :61
271
291
|
272
292
LL | assert!(matches!(Opt { optional: (), mandatory: None, .. }, z));
273
293
| ^
@@ -279,7 +299,7 @@ LL + assert!(matches!(Opt { optional: (), mandatory: None, }, z));
279
299
|
280
300
281
301
error[E0797]: base expression required after `..`
282
- --> $DIR/feature-gate-default-field-values.rs:94 :51
302
+ --> $DIR/feature-gate-default-field-values.rs:104 :51
283
303
|
284
304
LL | let y = OptEnum::Variant { mandatory: None, .. };
285
305
| ^
@@ -294,7 +314,7 @@ LL | let y = OptEnum::Variant { mandatory: None, ../* expr */ };
294
314
| ++++++++++
295
315
296
316
error[E0797]: base expression required after `..`
297
- --> $DIR/feature-gate-default-field-values.rs:98 :60
317
+ --> $DIR/feature-gate-default-field-values.rs:108 :60
298
318
|
299
319
LL | assert!(matches!(OptEnum::Variant { mandatory: None, .. }, z));
300
320
| ^
@@ -309,7 +329,7 @@ LL | assert!(matches!(OptEnum::Variant { mandatory: None, ../* expr */ }, z)
309
329
| ++++++++++
310
330
311
331
error[E0797]: base expression required after `..`
312
- --> $DIR/feature-gate-default-field-values.rs:100 :43
332
+ --> $DIR/feature-gate-default-field-values.rs:110 :43
313
333
|
314
334
LL | assert!(matches!(OptEnum::Variant { .. }, z));
315
335
| ^
@@ -320,7 +340,7 @@ LL | assert!(matches!(OptEnum::Variant { ../* expr */ }, z));
320
340
| ++++++++++
321
341
322
342
error[E0797]: base expression required after `..`
323
- --> $DIR/feature-gate-default-field-values.rs:102 :57
343
+ --> $DIR/feature-gate-default-field-values.rs:112 :57
324
344
|
325
345
LL | assert!(matches!(OptEnum::Variant { optional: (), .. }, z));
326
346
| ^
@@ -331,7 +351,7 @@ LL | assert!(matches!(OptEnum::Variant { optional: (), ../* expr */ }, z));
331
351
| ++++++++++
332
352
333
353
error[E0797]: base expression required after `..`
334
- --> $DIR/feature-gate-default-field-values.rs:104 :74
354
+ --> $DIR/feature-gate-default-field-values.rs:114 :74
335
355
|
336
356
LL | assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }, z));
337
357
| ^
@@ -342,7 +362,7 @@ LL - assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }
342
362
LL + assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, }, z));
343
363
|
344
364
345
- error: aborting due to 29 previous errors
365
+ error: aborting due to 31 previous errors
346
366
347
367
Some errors have detailed explanations: E0658, E0797.
348
368
For more information about an error, try `rustc --explain E0658`.
0 commit comments