File tree 1 file changed +0
-31
lines changed
1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -40,37 +40,6 @@ Ensure the ordering of the match arm is correct and remove any superfluous
40
40
arms.
41
41
"## ,
42
42
43
- E0002 : r##"
44
- This error indicates that an empty match expression is invalid because the type
45
- it is matching on is non-empty (there exist values of this type). In safe code
46
- it is impossible to create an instance of an empty type, so empty match
47
- expressions are almost never desired. This error is typically fixed by adding
48
- one or more cases to the match expression.
49
-
50
- An example of an empty type is `enum Empty { }`. So, the following will work:
51
-
52
- ```
53
- enum Empty {}
54
-
55
- fn foo(x: Empty) {
56
- match x {
57
- // empty
58
- }
59
- }
60
- ```
61
-
62
- However, this won't:
63
-
64
- ```compile_fail
65
- fn foo(x: Option<String>) {
66
- match x {
67
- // empty
68
- }
69
- }
70
- ```
71
- "## ,
72
-
73
-
74
43
E0003 : r##"
75
44
Not-a-Number (NaN) values cannot be compared for equality and hence can never
76
45
match the input to a match expression. So, the following will not compile:
You can’t perform that action at this time.
0 commit comments