[gcc r14-7486] gccrs: ast: Fix scope separator in tokenstreams

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 17:38:04 GMT 2024


https://gcc.gnu.org/g:c353758f7e7152898315b0f9a3329d464fa82a1c

commit r14-7486-gc353758f7e7152898315b0f9a3329d464fa82a1c
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Mon Apr 17 18:27:24 2023 +0200

    gccrs: ast: Fix scope separator in tokenstreams
    
    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>

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

diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 92654dc5a51..bd0b6e4cd19 100644
--- a/gcc/rust/ast/rust-ast-tokenstream.cc
+++ b/gcc/rust/ast/rust-ast-tokenstream.cc
@@ -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);
     }
 }


More information about the Gcc-cvs mailing list