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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
error[E0603]: tuple variant `Tuple` is private
--> $DIR/variant.rs:11:48
|
LL | let variant_tuple = NonExhaustiveVariants::Tuple(640);
| ^^^^^ private tuple variant
|
note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23
|
LL | #[non_exhaustive] Tuple(u32),
| ^^^^^
error[E0603]: unit variant `Unit` is private
--> $DIR/variant.rs:14:47
|
LL | let variant_unit = NonExhaustiveVariants::Unit;
| ^^^^ private unit variant
|
note: the unit variant `Unit` is defined here
--> $DIR/auxiliary/variants.rs:4:23
|
LL | #[non_exhaustive] Unit,
| ^^^^
error[E0603]: unit variant `Unit` is private
--> $DIR/variant.rs:18:32
|
LL | NonExhaustiveVariants::Unit => "",
| ^^^^ private unit variant
|
note: the unit variant `Unit` is defined here
--> $DIR/auxiliary/variants.rs:4:23
|
LL | #[non_exhaustive] Unit,
| ^^^^
error[E0603]: tuple variant `Tuple` is private
--> $DIR/variant.rs:20:32
|
LL | NonExhaustiveVariants::Tuple(fe_tpl) => "",
| ^^^^^ private tuple variant
|
note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23
|
LL | #[non_exhaustive] Tuple(u32),
| ^^^^^
error[E0603]: tuple variant `Tuple` is private
--> $DIR/variant.rs:26:35
|
LL | if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct {
| ^^^^^ private tuple variant
|
note: the tuple variant `Tuple` is defined here
--> $DIR/auxiliary/variants.rs:5:23
|
LL | #[non_exhaustive] Tuple(u32),
| ^^^^^
error[E0639]: cannot create non-exhaustive variant using struct expression
--> $DIR/variant.rs:8:26
|
LL | let variant_struct = NonExhaustiveVariants::Struct { field: 640 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0638]: `..` required with variant marked as non-exhaustive
--> $DIR/variant.rs:22:9
|
LL | NonExhaustiveVariants::Struct { field } => ""
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: add `..` at the end of the field list to ignore all other fields
|
LL | NonExhaustiveVariants::Struct { field , .. } => ""
| ~~~~~~
error[E0638]: `..` required with variant marked as non-exhaustive
--> $DIR/variant.rs:30:12
|
LL | if let NonExhaustiveVariants::Struct { field } = variant_struct {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: add `..` at the end of the field list to ignore all other fields
|
LL | if let NonExhaustiveVariants::Struct { field , .. } = variant_struct {
| ~~~~~~
error: aborting due to 8 previous errors
Some errors have detailed explanations: E0603, E0638, E0639.
For more information about an error, try `rustc --explain E0603`.
|