]> git.lizzy.rs Git - rust.git/blob - src/test/ui/structs/struct-field-cfg.stderr
Override rustc version in ui and mir-opt tests to get stable hashes
[rust.git] / src / test / ui / structs / struct-field-cfg.stderr
1 error[E0063]: missing field `present` in initializer of `Foo`
2   --> $DIR/struct-field-cfg.rs:7:13
3    |
4 LL |     let _ = Foo { #[cfg(any())] present: () };
5    |             ^^^ missing `present`
6
7 error[E0560]: struct `Foo` has no field named `absent`
8   --> $DIR/struct-field-cfg.rs:10:46
9    |
10 LL |     let _ = Foo { present: (), #[cfg(all())] absent: () };
11    |                                              ^^^^^^ `Foo` does not have this field
12    |
13    = note: available fields are: `present`
14
15 error[E0027]: pattern does not mention field `present`
16   --> $DIR/struct-field-cfg.rs:13:9
17    |
18 LL |     let Foo { #[cfg(any())] present: () } = foo;
19    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `present`
20    |
21 help: include the missing field in the pattern
22    |
23 LL |     let Foo { present } = foo;
24    |             ~~~~~~~~~~~
25 help: if you don't care about this missing field, you can explicitly ignore it
26    |
27 LL |     let Foo { .. } = foo;
28    |             ~~~~~~
29
30 error[E0026]: struct `Foo` does not have a field named `absent`
31   --> $DIR/struct-field-cfg.rs:16:42
32    |
33 LL |     let Foo { present: (), #[cfg(all())] absent: () } = foo;
34    |                                          ^^^^^^ struct `Foo` does not have this field
35
36 error: aborting due to 4 previous errors
37
38 Some errors have detailed explanations: E0026, E0027, E0063, E0560.
39 For more information about an error, try `rustc --explain E0026`.