|
| 1 | +error[E0658]: default values on fields are experimental |
| 2 | + --> $DIR/non-exhaustive-ctor.rs:9:22 |
| 3 | + | |
| 4 | +LL | pub field: () = (), |
| 5 | + | ^^^^^ |
| 6 | + | |
| 7 | + = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information |
| 8 | + = help: add `#![feature(default_field_values)]` to the crate attributes to enable |
| 9 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 10 | + |
| 11 | +error[E0658]: default values on fields are experimental |
| 12 | + --> $DIR/non-exhaustive-ctor.rs:11:25 |
| 13 | + | |
| 14 | +LL | pub field1: Priv = Priv, |
| 15 | + | ^^^^^^^ |
| 16 | + | |
| 17 | + = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information |
| 18 | + = help: add `#![feature(default_field_values)]` to the crate attributes to enable |
| 19 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 20 | + |
| 21 | +error[E0658]: default values on fields are experimental |
| 22 | + --> $DIR/non-exhaustive-ctor.rs:13:25 |
| 23 | + | |
| 24 | +LL | pub field2: Priv = Priv, |
| 25 | + | ^^^^^^^ |
| 26 | + | |
| 27 | + = note: see issue #132162 <https://github.com/rust-lang/rust/issues/132162> for more information |
| 28 | + = help: add `#![feature(default_field_values)]` to the crate attributes to enable |
| 29 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 30 | + |
| 31 | +error[E0797]: base expression required after `..` |
| 32 | + --> $DIR/non-exhaustive-ctor.rs:20:19 |
| 33 | + | |
| 34 | +LL | let _ = S { .. }; // ok |
| 35 | + | ^ |
| 36 | + | |
| 37 | +help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields |
| 38 | + | |
| 39 | +LL + #![feature(default_field_values)] |
| 40 | + | |
| 41 | +help: add a base expression here |
| 42 | + | |
| 43 | +LL | let _ = S { ../* expr */ }; // ok |
| 44 | + | ++++++++++ |
| 45 | + |
| 46 | +error[E0797]: base expression required after `..` |
| 47 | + --> $DIR/non-exhaustive-ctor.rs:22:30 |
| 48 | + | |
| 49 | +LL | let _ = S { field: (), .. }; // ok |
| 50 | + | ^ |
| 51 | + | |
| 52 | +help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields |
| 53 | + | |
| 54 | +LL + #![feature(default_field_values)] |
| 55 | + | |
| 56 | +help: add a base expression here |
| 57 | + | |
| 58 | +LL | let _ = S { field: (), ../* expr */ }; // ok |
| 59 | + | ++++++++++ |
| 60 | + |
| 61 | +error[E0063]: missing fields `field`, `field1` and `field2` in initializer of `S` |
| 62 | + --> $DIR/non-exhaustive-ctor.rs:24:13 |
| 63 | + | |
| 64 | +LL | let _ = S { }; |
| 65 | + | ^ missing `field`, `field1` and `field2` |
| 66 | + | |
| 67 | +help: all remaining fields have default values, if you added `#![feature(default_field_values)]` to your crate you could use those values with `..` |
| 68 | + | |
| 69 | +LL | let _ = S { .. }; |
| 70 | + | ~~~~~~ |
| 71 | + |
| 72 | +error[E0063]: missing fields `field1` and `field2` in initializer of `S` |
| 73 | + --> $DIR/non-exhaustive-ctor.rs:26:13 |
| 74 | + | |
| 75 | +LL | let _ = S { field: () }; |
| 76 | + | ^ missing `field1` and `field2` |
| 77 | + | |
| 78 | +help: all remaining fields have default values, if you added `#![feature(default_field_values)]` to your crate you could use those values with `..` |
| 79 | + | |
| 80 | +LL | let _ = S { field: (), .. }; |
| 81 | + | ++++ |
| 82 | + |
| 83 | +error: aborting due to 7 previous errors |
| 84 | + |
| 85 | +Some errors have detailed explanations: E0063, E0658, E0797. |
| 86 | +For more information about an error, try `rustc --explain E0063`. |
0 commit comments