]>
Commit | Line | Data |
---|---|---|
532ac7d7 XL |
1 | error[E0603]: tuple variant `Tuple` is private |
2 | --> $DIR/variant.rs:11:48 | |
3 | | | |
4 | LL | let variant_tuple = NonExhaustiveVariants::Tuple(640); | |
5 | | ^^^^^ | |
416331ca XL |
6 | | |
7 | = note: a tuple variant constructor is private if any of its fields is private | |
532ac7d7 XL |
8 | |
9 | error[E0603]: unit variant `Unit` is private | |
10 | --> $DIR/variant.rs:14:47 | |
11 | | | |
12 | LL | let variant_unit = NonExhaustiveVariants::Unit; | |
13 | | ^^^^ | |
14 | ||
15 | error[E0603]: unit variant `Unit` is private | |
16 | --> $DIR/variant.rs:18:32 | |
17 | | | |
18 | LL | NonExhaustiveVariants::Unit => "", | |
19 | | ^^^^ | |
20 | ||
21 | error[E0603]: tuple variant `Tuple` is private | |
22 | --> $DIR/variant.rs:20:32 | |
23 | | | |
24 | LL | NonExhaustiveVariants::Tuple(fe_tpl) => "", | |
25 | | ^^^^^ | |
416331ca XL |
26 | | |
27 | = note: a tuple variant constructor is private if any of its fields is private | |
532ac7d7 XL |
28 | |
29 | error[E0603]: tuple variant `Tuple` is private | |
30 | --> $DIR/variant.rs:26:35 | |
31 | | | |
32 | LL | if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct { | |
33 | | ^^^^^ | |
416331ca XL |
34 | | |
35 | = note: a tuple variant constructor is private if any of its fields is private | |
532ac7d7 XL |
36 | |
37 | error[E0639]: cannot create non-exhaustive variant using struct expression | |
38 | --> $DIR/variant.rs:8:26 | |
39 | | | |
40 | LL | let variant_struct = NonExhaustiveVariants::Struct { field: 640 }; | |
41 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
42 | ||
43 | error[E0638]: `..` required with variant marked as non-exhaustive | |
44 | --> $DIR/variant.rs:22:9 | |
45 | | | |
46 | LL | NonExhaustiveVariants::Struct { field } => "" | |
47 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
48 | ||
49 | error[E0638]: `..` required with variant marked as non-exhaustive | |
50 | --> $DIR/variant.rs:30:12 | |
51 | | | |
52 | LL | if let NonExhaustiveVariants::Struct { field } = variant_struct { | |
53 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
54 | ||
55 | error: aborting due to 8 previous errors | |
56 | ||
48663c56 | 57 | Some errors have detailed explanations: E0603, E0638, E0639. |
532ac7d7 | 58 | For more information about an error, try `rustc --explain E0603`. |