public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] ast: Fix tokenstream QualifiedPathInExpression
@ 2023-04-18 16:46 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-04-18 16:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4f2f07943d639f1635cf3dfd092ad27ca050ba65

commit 4f2f07943d639f1635cf3dfd092ad27ca050ba65
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Mon Apr 17 18:26:03 2023 +0200

    ast: Fix tokenstream QualifiedPathInExpression
    
    The associated type was not kept in the tokenstream.
    
    gcc/rust/ChangeLog:
    
            * ast/rust-ast-tokenstream.cc (TokenStream::visit): Keep
            associated type.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/ast/rust-ast-tokenstream.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 67b122a9089..92654dc5a51 100644
--- a/gcc/rust/ast/rust-ast-tokenstream.cc
+++ b/gcc/rust/ast/rust-ast-tokenstream.cc
@@ -745,8 +745,10 @@ TokenStream::visit (PathIdentSegment &segment)
 void
 TokenStream::visit (QualifiedPathInExpression &path)
 {
+  visit (path.get_qualified_path_type ());
   for (auto &segment : path.get_segments ())
     {
+      tokens.push_back (Rust::Token::make (SCOPE_RESOLUTION, Location ()));
       visit (segment);
     }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-18 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 16:46 [gcc/devel/rust/master] ast: Fix tokenstream QualifiedPathInExpression Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).