Keep track of a span for alias strings

This commit is contained in:
David Tolnay
2024-11-10 19:08:28 -08:00
parent f0b5c4f857
commit 373edcd055
6 changed files with 121 additions and 45 deletions
+2 -2
View File
@@ -332,13 +332,13 @@ fn check_internal_tag_field_name_conflict(cx: &Ctxt, cont: &Container) {
let name = field.attrs.name();
let ser_name = name.serialize_name();
if check_ser && ser_name == tag {
if check_ser && ser_name.value == tag {
diagnose_conflict();
return;
}
for de_name in field.attrs.aliases() {
if check_de && de_name == tag {
if check_de && de_name.value == tag {
diagnose_conflict();
return;
}