aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-04-17 18:26:03 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2023-04-17 17:25:51 +0000
commit4f2f07943d639f1635cf3dfd092ad27ca050ba65 (patch)
tree0fe85701322a721f516999ff994348da1d0950ad
parent2d478a4c3e116602bd124fd994d5ad043252bac3 (diff)
downloadgcc-4f2f07943d639f1635cf3dfd092ad27ca050ba65.zip
gcc-4f2f07943d639f1635cf3dfd092ad27ca050ba65.tar.gz
gcc-4f2f07943d639f1635cf3dfd092ad27ca050ba65.tar.bz2
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>
-rw-r--r--gcc/rust/ast/rust-ast-tokenstream.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 67b122a..92654dc 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);
}
}