@@ -124,8 +124,28 @@ LL | optional: () = (),
124124 = help: add `#![feature(default_field_values)]` to the crate attributes to enable
125125 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
126126
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+
127147error[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
129149 |
130150LL | let x = Foo { .. };
131151 | ^
@@ -140,7 +160,7 @@ LL | let x = Foo { ../* expr */ };
140160 | ++++++++++
141161
142162error[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
144164 |
145165LL | let z = Foo { baz: 1, .. };
146166 | ^
@@ -155,7 +175,7 @@ LL | let z = Foo { baz: 1, ../* expr */ };
155175 | ++++++++++
156176
157177error[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
159179 |
160180LL | let x = Bar::Foo { .. };
161181 | ^
@@ -170,7 +190,7 @@ LL | let x = Bar::Foo { ../* expr */ };
170190 | ++++++++++
171191
172192error[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
174194 |
175195LL | let z = Bar::Foo { baz: 1, .. };
176196 | ^
@@ -185,7 +205,7 @@ LL | let z = Bar::Foo { baz: 1, ../* expr */ };
185205 | ++++++++++
186206
187207error[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
189209 |
190210LL | let x = Qux::<i32, 4> { .. };
191211 | ^
@@ -200,7 +220,7 @@ LL | let x = Qux::<i32, 4> { ../* expr */ };
200220 | ++++++++++
201221
202222error[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
204224 |
205225LL | assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, bay: 4, .. }, x));
206226 | ^
@@ -215,7 +235,7 @@ LL | assert!(matches!(Qux::<i32, 4> { bar: S, baz: 42, bat: 2, bay: 4, ../*
215235 | ++++++++++
216236
217237error[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
219239 |
220240LL | let y = Opt { mandatory: None, .. };
221241 | ^
@@ -230,7 +250,7 @@ LL | let y = Opt { mandatory: None, ../* expr */ };
230250 | ++++++++++
231251
232252error[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
234254 |
235255LL | assert!(matches!(Opt { mandatory: None, .. }, z));
236256 | ^
@@ -245,7 +265,7 @@ LL | assert!(matches!(Opt { mandatory: None, ../* expr */ }, z));
245265 | ++++++++++
246266
247267error[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
249269 |
250270LL | assert!(matches!(Opt { .. }, z));
251271 | ^
@@ -256,7 +276,7 @@ LL | assert!(matches!(Opt { ../* expr */ }, z));
256276 | ++++++++++
257277
258278error[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
260280 |
261281LL | assert!(matches!(Opt { optional: (), .. }, z));
262282 | ^
@@ -267,7 +287,7 @@ LL | assert!(matches!(Opt { optional: (), ../* expr */ }, z));
267287 | ++++++++++
268288
269289error[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
271291 |
272292LL | assert!(matches!(Opt { optional: (), mandatory: None, .. }, z));
273293 | ^
@@ -279,7 +299,7 @@ LL + assert!(matches!(Opt { optional: (), mandatory: None, }, z));
279299 |
280300
281301error[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
283303 |
284304LL | let y = OptEnum::Variant { mandatory: None, .. };
285305 | ^
@@ -294,7 +314,7 @@ LL | let y = OptEnum::Variant { mandatory: None, ../* expr */ };
294314 | ++++++++++
295315
296316error[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
298318 |
299319LL | assert!(matches!(OptEnum::Variant { mandatory: None, .. }, z));
300320 | ^
@@ -309,7 +329,7 @@ LL | assert!(matches!(OptEnum::Variant { mandatory: None, ../* expr */ }, z)
309329 | ++++++++++
310330
311331error[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
313333 |
314334LL | assert!(matches!(OptEnum::Variant { .. }, z));
315335 | ^
@@ -320,7 +340,7 @@ LL | assert!(matches!(OptEnum::Variant { ../* expr */ }, z));
320340 | ++++++++++
321341
322342error[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
324344 |
325345LL | assert!(matches!(OptEnum::Variant { optional: (), .. }, z));
326346 | ^
@@ -331,7 +351,7 @@ LL | assert!(matches!(OptEnum::Variant { optional: (), ../* expr */ }, z));
331351 | ++++++++++
332352
333353error[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
335355 |
336356LL | assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }, z));
337357 | ^
@@ -342,7 +362,7 @@ LL - assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }
342362LL + assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, }, z));
343363 |
344364
345- error: aborting due to 29 previous errors
365+ error: aborting due to 31 previous errors
346366
347367Some errors have detailed explanations: E0658, E0797.
348368For more information about an error, try `rustc --explain E0658`.
0 commit comments