A struct was declared with two fields having the same name.
Erroneous code example:
#![allow(unused)]
fn main() {
struct Foo {
field1: i32,
field1: i32, // error: field is already declared
}
} Please verify that the field names have been correctly spelled. Example:
#![allow(unused)]
fn main() {
struct Foo {
field1: i32,
field2: i32, // 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/E0124.html