]> git.proxmox.com Git - rustc.git/blame - src/librustc_error_codes/error_codes/E0560.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0560.md
CommitLineData
60c5eb7d
XL
1An unknown field was specified into a structure.
2
3Erroneous code example:
4
5```compile_fail,E0560
6struct Simba {
7 mother: u32,
8}
9
10let s = Simba { mother: 1, father: 0 };
11// error: structure `Simba` has no field named `father`
12```
13
14Verify you didn't misspell the field's name or that the field exists. Example:
15
16```
17struct Simba {
18 mother: u32,
19 father: u32,
20}
21
22let s = Simba { mother: 1, father: 0 }; // ok!
23```