]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make node id getter const.
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 26 Sep 2024 20:46:16 +0000 (22:46 +0200)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Thu, 26 Sep 2024 22:48:32 +0000 (22:48 +0000)
gcc/rust/ChangeLog:

* ast/rust-ast.h: Node id getter could be const.

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

index dc0fd8b0e4783ee746228f22e643f8f1e3185c3d..35f27e37dcd4e3fd42544025661e7fea582903db 100644 (file)
@@ -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 ()) {}