1 error[E0063]: missing field `present` in initializer of `Foo`
2 --> $DIR/struct-field-cfg.rs:7:13
4 LL | let _ = Foo { #[cfg(any())] present: () };
5 | ^^^ missing `present`
7 error[E0560]: struct `Foo` has no field named `absent`
8 --> $DIR/struct-field-cfg.rs:10:46
10 LL | let _ = Foo { present: (), #[cfg(all())] absent: () };
11 | ^^^^^^ `Foo` does not have this field
13 = note: available fields are: `present`
15 error[E0027]: pattern does not mention field `present`
16 --> $DIR/struct-field-cfg.rs:13:9
18 LL | let Foo { #[cfg(any())] present: () } = foo;
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `present`
21 error[E0026]: struct `Foo` does not have a field named `absent`
22 --> $DIR/struct-field-cfg.rs:16:42
24 LL | let Foo { present: (), #[cfg(all())] absent: () } = foo;
25 | ^^^^^^ struct `Foo` does not have this field
27 error: aborting due to 4 previous errors
29 Some errors occurred: E0026, E0027, E0063, E0560.
30 For more information about an error, try `rustc --explain E0026`.