From a091ce015fb257d40905e8ca9e62b285c53fcca5 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 17 Apr 2023 18:26:03 +0200 Subject: [PATCH] gccrs: 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 --- 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 67b122a90891..92654dc5a51b 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); } } -- 2.47.2