diff options
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0560.md')
-rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0560.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0560.md b/compiler/rustc_error_codes/src/error_codes/E0560.md new file mode 100644 index 000000000..7185bf38c --- /dev/null +++ b/compiler/rustc_error_codes/src/error_codes/E0560.md @@ -0,0 +1,23 @@ +An unknown field was specified into a structure. + +Erroneous code example: + +```compile_fail,E0560 +struct Simba { + mother: u32, +} + +let s = Simba { mother: 1, father: 0 }; +// error: structure `Simba` has no field named `father` +``` + +Verify you didn't misspell the field's name or that the field exists. Example: + +``` +struct Simba { + mother: u32, + father: u32, +} + +let s = Simba { mother: 1, father: 0 }; // ok! +``` |