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

commit d87b067b2d2ce5f904cd0d1143a8920a686d0e36
Author: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>
Date:   Thu Sep 26 22:46:16 2024 +0200

    Make node id getter const.
    
    gcc/rust/ChangeLog:
    
            * ast/rust-ast.h: Node id getter could be const.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>

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

diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index dc0fd8b0e478..35f27e37dcd4 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -1587,7 +1587,7 @@ public:
 
   virtual Kind get_kind () const = 0;
 
-  NodeId get_node_id () { return node_id; }
+  NodeId get_node_id () const { return node_id; }
 
 protected:
   GenericParam () : node_id (Analysis::Mappings::get ().get_next_node_id ()) {}

Reply via email to