An unknown field was specified into an enum's structure variant.
Erroneous code example:
#![allow(unused)]
fn main() {
enum Field {
Fool { x: u32 },
}
let s = Field::Fool { joke: 0 };
// error: struct variant `Field::Fool` has no field named `joke`
} Verify you didn't misspell the field's name or that the field exists. Example:
#![allow(unused)]
fn main() {
enum Field {
Fool { joke: u32 },
}
let s = Field::Fool { joke: 0 }; // ok!
}
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0559.html