]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: ast: Fix scope separator in tokenstreams
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 17 Apr 2023 16:27:24 +0000 (18:27 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:09 +0000 (18:34 +0100)
Qualified types had a simple colon output instead of full scope
resolution tokens in QualifiedPathInTypes.

gcc/rust/ChangeLog:

* ast/rust-ast-tokenstream.cc (TokenStream::visit): Fix scope
resolution token output.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-tokenstream.cc

index 92654dc5a51b58362d271bd6773f7ce506acfc98..bd0b6e4cd19131f24138c0f4a64ac8e3edc65956 100644 (file)
@@ -771,11 +771,11 @@ TokenStream::visit (QualifiedPathInType &path)
 {
   visit (path.get_qualified_path_type ());
 
-  tokens.push_back (Rust::Token::make (COLON, Location ()));
+  tokens.push_back (Rust::Token::make (SCOPE_RESOLUTION, Location ()));
   visit (path.get_associated_segment ());
   for (auto &segment : path.get_segments ())
     {
-      tokens.push_back (Rust::Token::make (COLON, Location ()));
+      tokens.push_back (Rust::Token::make (SCOPE_RESOLUTION, Location ()));
       visit (segment);
     }
 }