error: the `#[default]` attribute may only be used on unit enum variants --> $DIR/feature-gate-default-field-values.rs:15:5 | LL | Foo { | ^^^ | = help: consider a manual implementation of `Default` error: the `#[default]` attribute may only be used on unit enum variants --> $DIR/feature-gate-default-field-values.rs:55:5 | LL | Variant { | ^^^^^^^ | = help: consider a manual implementation of `Default` error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:8:15 | LL | pub bar: S = S, | ^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:9:17 | LL | pub baz: i32 = 42 + 3, | ^^^^^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:16:15 | LL | bar: S = S, | ^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:17:17 | LL | baz: i32 = 42 + 3, | ^^^^^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:23:11 | LL | bar: S = Qux::::S, | ^^^^^^^^^^^^^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:24:13 | LL | baz: i32 = foo(), | ^^^^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:25:13 | LL | bat: i32 = as T>::K, | ^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:26:13 | LL | bay: i32 = C, | ^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:27:16 | LL | bak: Vec = Vec::new(), | ^^^^^^^^^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:49:17 | LL | optional: () = (), | ^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: default values on fields are experimental --> $DIR/feature-gate-default-field-values.rs:57:21 | LL | optional: () = (), | ^^^^^ | = note: see issue #132162 for more information = help: add `#![feature(default_field_values)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:62:21 | LL | let x = Foo { .. }; | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | let x = Foo { ../* expr */ }; | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:64:29 | LL | let z = Foo { baz: 1, .. }; | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | let z = Foo { baz: 1, ../* expr */ }; | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:70:26 | LL | let x = Bar::Foo { .. }; | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | let x = Bar::Foo { ../* expr */ }; | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:72:34 | LL | let z = Bar::Foo { baz: 1, .. }; | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | let z = Bar::Foo { baz: 1, ../* expr */ }; | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:78:31 | LL | let x = Qux:: { .. }; | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | let x = Qux:: { ../* expr */ }; | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:79:73 | LL | assert!(matches!(Qux:: { bar: S, baz: 42, bat: 2, bay: 4, .. }, x)); | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | assert!(matches!(Qux:: { bar: S, baz: 42, bat: 2, bay: 4, ../* expr */ }, x)); | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:82:38 | LL | let y = Opt { mandatory: None, .. }; | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | let y = Opt { mandatory: None, ../* expr */ }; | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:86:47 | LL | assert!(matches!(Opt { mandatory: None, .. }, z)); | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | assert!(matches!(Opt { mandatory: None, ../* expr */ }, z)); | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:88:30 | LL | assert!(matches!(Opt { .. }, z)); | ^ | help: add a base expression here | LL | assert!(matches!(Opt { ../* expr */ }, z)); | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:90:44 | LL | assert!(matches!(Opt { optional: (), .. }, z)); | ^ | help: add a base expression here | LL | assert!(matches!(Opt { optional: (), ../* expr */ }, z)); | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:92:61 | LL | assert!(matches!(Opt { optional: (), mandatory: None, .. }, z)); | ^ | help: remove the `..` as all the fields are already present | LL - assert!(matches!(Opt { optional: (), mandatory: None, .. }, z)); LL + assert!(matches!(Opt { optional: (), mandatory: None, }, z)); | error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:94:51 | LL | let y = OptEnum::Variant { mandatory: None, .. }; | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | let y = OptEnum::Variant { mandatory: None, ../* expr */ }; | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:98:60 | LL | assert!(matches!(OptEnum::Variant { mandatory: None, .. }, z)); | ^ | = help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields help: add a base expression here | LL | assert!(matches!(OptEnum::Variant { mandatory: None, ../* expr */ }, z)); | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:100:43 | LL | assert!(matches!(OptEnum::Variant { .. }, z)); | ^ | help: add a base expression here | LL | assert!(matches!(OptEnum::Variant { ../* expr */ }, z)); | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:102:57 | LL | assert!(matches!(OptEnum::Variant { optional: (), .. }, z)); | ^ | help: add a base expression here | LL | assert!(matches!(OptEnum::Variant { optional: (), ../* expr */ }, z)); | ++++++++++ error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:104:74 | LL | assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }, z)); | ^ | help: remove the `..` as all the fields are already present | LL - assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, .. }, z)); LL + assert!(matches!(OptEnum::Variant { optional: (), mandatory: None, }, z)); | error: aborting due to 29 previous errors Some errors have detailed explanations: E0658, E0797. For more information about an error, try `rustc --explain E0658`.