https://gcc.gnu.org/g:5d3afe339b907749e65c369ca3814c7d6c2c216f

commit r15-8626-g5d3afe339b907749e65c369ca3814c7d6c2c216f
Author: Arthur Cohen <arthur.co...@embecosm.com>
Date:   Fri Jan 3 14:28:07 2025 +0000

    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.

Diff:
---
 gcc/rust/ast/rust-ast-collector.cc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gcc/rust/ast/rust-ast-collector.cc 
b/gcc/rust/ast/rust-ast-collector.cc
index 4c9c360c04d2..978de648a583 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

Reply via email to