fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.3 KiB37 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/variant or constant, found tuple variant `E::Empty4`
20  --> $DIR/empty-struct-tuple-pat.rs:29:9
21   |
22LL |         E::Empty4 => ()
23   |         ^^^^^^^^^ did you mean `E::Empty4 ( /* fields */ )`?
24
25error[E0532]: expected unit struct/variant or constant, found tuple variant `XE::XEmpty5`
26  --> $DIR/empty-struct-tuple-pat.rs:33:9
27   |
28LL |         XE::XEmpty5 => (),
29   |         ^^^^-------
30   |         |   |
31   |         |   help: a unit variant with a similar name exists: `XEmpty4`
32   |         did you mean `XE::XEmpty5 ( /* fields */ )`?
33
34error: aborting due to 4 previous errors
35
36Some errors have detailed explanations: E0530, E0532.
37For more information about an error, try `rustc --explain E0530`.