fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
1.4 KiB40 linesraw
1error[E0530]: match bindings cannot shadow tuple structs
2  --> $DIR/empty-struct-tuple-pat.rs:22:9
3   |
4LL | struct Empty2();
5   | ---------------- the tuple struct `Empty2` is defined here
6...
7LL |         Empty2 => ()
8   |         ^^^^^^ cannot be named the same as a tuple struct
9
10error[E0530]: match bindings cannot shadow tuple structs
11  --> $DIR/empty-struct-tuple-pat.rs:25:9
12   |
13LL | use empty_struct::*;
14   |     --------------- the tuple struct `XEmpty6` is imported here
15...
16LL |         XEmpty6 => ()
17   |         ^^^^^^^ cannot be named the same as a tuple struct
18
19error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
20  --> $DIR/empty-struct-tuple-pat.rs:29:9
21   |
22LL |     Empty4()
23   |     -------- `E::Empty4` defined here
24...
25LL |         E::Empty4 => ()
26   |         ^^^^^^^^^ did you mean `E::Empty4( /* fields */ )`?
27
28error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5`
29  --> $DIR/empty-struct-tuple-pat.rs:33:9
30   |
31LL |         XE::XEmpty5 => (),
32   |         ^^^^-------
33   |         |   |
34   |         |   help: a unit variant with a similar name exists: `XEmpty4`
35   |         did you mean `XE::XEmpty5( /* fields */ )`?
36
37error: aborting due to 4 previous errors
38
39Some errors have detailed explanations: E0530, E0532.
40For more information about an error, try `rustc --explain E0530`.