]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-braces-pat-1.stderr
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
[rust.git] / src / test / ui / empty / empty-struct-braces-pat-1.stderr
1 error[E0532]: expected unit struct, unit variant or constant, found struct variant `E::Empty3`
2   --> $DIR/empty-struct-braces-pat-1.rs:24:9
3    |
4 LL |     Empty3 {}
5    |     --------- `E::Empty3` defined here
6 ...
7 LL |         E::Empty3 => ()
8    |         ^^^^^^^^^ help: use struct pattern syntax instead: `E::Empty3 {}`
9
10 error[E0532]: expected unit struct, unit variant or constant, found struct variant `XE::XEmpty3`
11   --> $DIR/empty-struct-braces-pat-1.rs:31:9
12    |
13 LL |         XE::XEmpty3 => ()
14    |         ^^^^^^^^^^^
15    |
16   ::: $DIR/auxiliary/empty-struct.rs:6:5
17    |
18 LL |     XEmpty3 {},
19    |     ------- `XE::XEmpty3` defined here
20 LL |     XEmpty4,
21    |     ------- similarly named unit variant `XEmpty4` defined here
22    |
23 help: use struct pattern syntax instead
24    |
25 LL |         XE::XEmpty3 { /* fields */ } => ()
26    |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 help: a unit variant with a similar name exists
28    |
29 LL |         XE::XEmpty4 => ()
30    |             ~~~~~~~
31
32 error: aborting due to 2 previous errors
33
34 For more information about this error, try `rustc --explain E0532`.