A struct literal sets the same field twice.
struct User { id: u64, name: String }
let u = User { id: 1, name: "ada".into(), id: 2 };
// E0062: field `id` specified more than once
Struct literal syntax names each field at most once. Duplicates are almost always a typo or a botched merge.
- Remove the duplicate. - After conflict resolution, eyeball the literal and lint via clippy/cargo check. - For builders, the same shape is impossible because each setter is a method call — yet another reason to prefer builder over raw literals for many-field structs.