aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2025-05-09 20:48:18 -0400
committerPhilip Herron <philip.herron@embecosm.com>2025-05-13 09:20:07 +0000
commitf33bae65a16b6d8c9d4f491638c4728f9c231ed4 (patch)
tree29c2a317a95130337566648ada10505daa5a10c3 /gcc/rust
parentdfc026ce0acf9a24f14c3ff1c019a35abfee2c27 (diff)
downloadgcc-f33bae65a16b6d8c9d4f491638c4728f9c231ed4.zip
gcc-f33bae65a16b6d8c9d4f491638c4728f9c231ed4.tar.gz
gcc-f33bae65a16b6d8c9d4f491638c4728f9c231ed4.tar.bz2
Fix test same_field_name.rs
gcc/rust/ChangeLog: * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Keep going after a duplicate field is found. gcc/testsuite/ChangeLog: * rust/execute/same_field_name.rs: Move to... * rust/compile/same_field_name.rs: ...here and adjust expected errors. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/hir/rust-ast-lower-item.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-item.cc b/gcc/rust/hir/rust-ast-lower-item.cc
index 9bb968f..07b1c9d 100644
--- a/gcc/rust/hir/rust-ast-lower-item.cc
+++ b/gcc/rust/hir/rust-ast-lower-item.cc
@@ -217,7 +217,7 @@ ASTLoweringItem::visit (AST::StructStruct &struct_decl)
field.get_outer_attrs ());
if (struct_field_name_exists (fields, translated_field))
- break;
+ continue;
fields.push_back (std::move (translated_field));
}