Skip to content

Commit

Permalink
ast-collector: Fix tuple struct pattern collection
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* ast/rust-ast-collector.cc (TokenCollector::visit): Visit tuple pattern items as
	separated by commas.
  • Loading branch information
CohenArthur committed Jan 16, 2025
1 parent b8eb6cd commit aacecba
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gcc/rust/ast/rust-ast-collector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aacecba

Please sign in to comment.