[gcc r17-3078] gccrs: Fix TypePathSegmentGeneric token collection

Arthur Cohen via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:41305b6fa0b9bc4066c31c0c8e9563d043dd6b1f

commit r17-3078-g41305b6fa0b9bc4066c31c0c8e9563d043dd6b1f
Author: Owen Avery <[email protected]>
Date:   Wed Jun 10 00:22:29 2026 -0400

    gccrs: Fix TypePathSegmentGeneric token collection
    
    gcc/rust/ChangeLog:
    
            * ast/rust-ast-collector.cc
            (TokenCollector::visit (TypePathSegmentGeneric)): Remove
            duplicate push of segment identifier.
    
    Signed-off-by: Owen Avery <[email protected]>

Diff:
---
 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 f0d8957eff57..b478a8d4804e 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 ();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.