summary refs log tree commit diff
path: root/src/test/ui/structs/struct-field-cfg.stderr
blob: db4790659c37b0158cd93a1346e2be266b060646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error[E0063]: missing field `present` in initializer of `Foo`
  --> $DIR/struct-field-cfg.rs:17:13
   |
LL |     let _ = Foo { #[cfg(any())] present: () };
   |             ^^^ missing `present`

error[E0560]: struct `Foo` has no field named `absent`
  --> $DIR/struct-field-cfg.rs:20:46
   |
LL |     let _ = Foo { present: (), #[cfg(all())] absent: () };
   |                                              ^^^^^^ `Foo` does not have this field
   |
   = note: available fields are: `present`

error[E0027]: pattern does not mention field `present`
  --> $DIR/struct-field-cfg.rs:23:9
   |
LL |     let Foo { #[cfg(any())] present: () } = foo;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `present`

error[E0026]: struct `Foo` does not have a field named `absent`
  --> $DIR/struct-field-cfg.rs:26:42
   |
LL |     let Foo { present: (), #[cfg(all())] absent: () } = foo;
   |                                          ^^^^^^^^^^ struct `Foo` does not have this field

error: aborting due to 4 previous errors

Some errors occurred: E0026, E0027, E0063, E0560.
For more information about an error, try `rustc --explain E0026`.