]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add missing override specifier
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 2 Nov 2023 17:10:32 +0000 (18:10 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:36 +0000 (19:09 +0100)
Some function lacked the override specifier, this made the compiler emit
several warning.

gcc/rust/ChangeLog:

* ast/rust-ast.h: Add override specifier.
* ast/rust-item.h: Likewise.

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

index 9f5242ae80d7918b4cc930eefa4c856a77003732..75af2940c766f4c5310bed5e6868648e6423fde4 100644 (file)
@@ -1495,7 +1495,7 @@ public:
   }
 
   NodeId get_node_id () const { return node_id; }
-  location_t get_locus () const { return locus; }
+  location_t get_locus () const override { return locus; }
 };
 
 /* Abstract base class for items used within an inherent impl block (the impl
index eba86dca2fa738f2b3d5c5134211d210ec672a55..57059eb06723045a23b5f6bf00e9985741c04386 100644 (file)
@@ -3291,7 +3291,7 @@ public:
 
   std::string as_string () const override;
 
-  location_t get_locus () const { return locus; }
+  location_t get_locus () const override { return locus; }
 
   void accept_vis (ASTVisitor &vis) override;