[COMMITTED 20/77] gccrs: Fix TypePathSegmentGeneric token collection
arthur.cohen@embecosm.com
arthur.cohen@embecosm.com
Fri Aug 7 12:39:11 GMT 2026
From: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc
(TokenCollector::visit (TypePathSegmentGeneric)): Remove
duplicate push of segment identifier.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
---
gcc/rust/ast/rust-ast-collector.cc | 8 --------
1 file changed, 8 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index f0d8957eff5..b478a8d4804 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -642,14 +642,6 @@ TokenCollector::visit (TypePathSegmentGeneric &segment)
// `<` `>`
// | `<` ( GenericArg `,` )* GenericArg `,`? `>`
describe_node (std::string ("TypePathSegmentGeneric"), [this, &segment] () {
- auto ident_segment
- = segment.is_lang_item ()
- ? PathIdentSegment ("LANG_ITEM", segment.get_locus ())
- : segment.get_ident_segment ();
- auto id = ident_segment.as_string ();
- push (Rust::Token::make_identifier (ident_segment.get_locus (),
- std::move (id)));
-
auto locus = segment.is_lang_item ()
? segment.get_locus ()
: segment.get_ident_segment ().get_locus ();
--
2.50.1
More information about the Gcc-rust
mailing list