[gcc r14-7448] gccrs: ast: Change visibility in token type

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 17:35:37 GMT 2024


https://gcc.gnu.org/g:08ac705b21542b064ebd95b71405281d14192fd2

commit r14-7448-g08ac705b21542b064ebd95b71405281d14192fd2
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Tue Apr 4 16:19:51 2023 +0200

    gccrs: ast: Change visibility in token type
    
    Change the token type from a custom identifier to the reserved token
    keyword "in".
    
    gcc/rust/ChangeLog:
    
            * ast/rust-ast-tokenstream.cc (TokenStream::visit): Change token
            type.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/ast/rust-ast-tokenstream.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 0db1e2ccfed..a380fec8696 100644
--- a/gcc/rust/ast/rust-ast-tokenstream.cc
+++ b/gcc/rust/ast/rust-ast-tokenstream.cc
@@ -248,7 +248,7 @@ TokenStream::visit (Visibility &vis)
     case Visibility::PUB_IN_PATH:
       tokens.push_back (Rust::Token::make (PUB, vis.get_locus ()));
       tokens.push_back (Rust::Token::make (LEFT_PAREN, Location ()));
-      tokens.push_back (Rust::Token::make_identifier (Location (), "in"));
+      tokens.push_back (Rust::Token::make (IN, Location ()));
       visit (vis.get_path ());
       tokens.push_back (Rust::Token::make (RIGHT_PAREN, Location ()));
       break;


More information about the Gcc-cvs mailing list