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