From: Pierre-Emmanuel Patry Date: Mon, 17 Apr 2023 16:26:03 +0000 (+0200) Subject: gccrs: ast: Fix tokenstream QualifiedPathInExpression X-Git-Tag: basepoints/gcc-15~2654 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a091ce015fb257d40905e8ca9e62b285c53fcca5;p=thirdparty%2Fgcc.git 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 --- 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); } }