]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add override modifier
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 1 Oct 2025 14:24:18 +0000 (16:24 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 20:30:55 +0000 (21:30 +0100)
gcc/rust/ChangeLog:

* ast/rust-ast.h: Add missing override modifier.
* ast/rust-path.h: Likewise.

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

index f14136f445bbaf35246ac6fd958f4ba841997ee4..8a7e618b05ced131200063b76f7ee6ea68d524f1 100644 (file)
@@ -1777,7 +1777,7 @@ public:
     return std::unique_ptr<TraitItem> (clone_associated_item_impl ());
   }
 
-  NodeId get_node_id () const { return node_id; }
+  NodeId get_node_id () const override { return node_id; }
   location_t get_locus () const override { return locus; }
 };
 
index 88b5327c33ce12a72a7f6b5ee4b3dbbb306e7cce..be04882ed6ad26c66e9846af30094cae803a2fbc 100644 (file)
@@ -1255,7 +1255,7 @@ public:
   TraitBound *to_trait_bound (bool in_parens) const override;
 
   location_t get_locus () const override final { return locus; }
-  NodeId get_node_id () const { return node_id; }
+  NodeId get_node_id () const override { return node_id; }
 
   void mark_for_strip () override {}
   bool is_marked_for_strip () const override { return false; }