Fixes #7377
auto merge of #7443 : yjh0502/rust/fix_field_dup, r=huonw

Check if there is duplicated field names in struct.