File tree 1 file changed +25
-1
lines changed
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -4029,6 +4029,31 @@ impl SpaceLlama for i32 {
4029
4029
```
4030
4030
"## ,
4031
4031
4032
+ E0559 : r##"
4033
+ An unknown field was specified into an enum's structure variant.
4034
+
4035
+ Erroneous code example:
4036
+
4037
+ ```compile_fail,E0559
4038
+ enum Field {
4039
+ Fool { x: u32 },
4040
+ }
4041
+
4042
+ let s = Field::Fool { joke: 0 };
4043
+ // error: struct variant `Field::Fool` has no field named `joke`
4044
+ ```
4045
+
4046
+ Verify you didn't misspell the field's name or that the field exists. Example:
4047
+
4048
+ ```
4049
+ enum Field {
4050
+ Fool { joke: u32 },
4051
+ }
4052
+
4053
+ let s = Field::Fool { joke: 0 }; // ok!
4054
+ ```
4055
+ "## ,
4056
+
4032
4057
E0560 : r##"
4033
4058
An unknown field was specified into a structure.
4034
4059
@@ -4127,5 +4152,4 @@ register_diagnostics! {
4127
4152
E0528 , // expected at least {} elements, found {}
4128
4153
E0529 , // slice pattern expects array or slice, not `{}`
4129
4154
E0533 , // `{}` does not name a unit variant, unit struct or a constant
4130
- E0559 ,
4131
4155
}
You can’t perform that action at this time.
0 commit comments