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