aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-01-03 14:28:07 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-21 12:57:50 +0100
commit5d3afe339b907749e65c369ca3814c7d6c2c216f (patch)
tree628d5531eba7fe04942b1d6299be7e5f0a61cd45 /gcc
parent1c9cd6a60128dc860ef7879222fddf91790e4515 (diff)
downloadgcc-5d3afe339b907749e65c369ca3814c7d6c2c216f.zip
gcc-5d3afe339b907749e65c369ca3814c7d6c2c216f.tar.gz
gcc-5d3afe339b907749e65c369ca3814c7d6c2c216f.tar.bz2
gccrs: ast-collector: Fix tuple struct pattern collection
gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Visit tuple pattern items as separated by commas.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-ast-collector.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index 4c9c360..978de64 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -2470,10 +2470,7 @@ TokenCollector::visit (StructPattern &pattern)
void
TokenCollector::visit (TupleStructItemsNoRange &pattern)
{
- for (auto &pat : pattern.get_patterns ())
- {
- visit (pat);
- }
+ visit_items_joined_by_separator (pattern.get_patterns ());
}
void