]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add missing override specifier
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 2 Nov 2023 17:10:32 +0000 (18:10 +0100)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Mon, 6 Nov 2023 11:46:54 +0000 (11:46 +0000)
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 a2d088e0594771aae6ba7babed324d85775bb455..35612935d7c316b3bed0e17bfb3d8f3262e604bd 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 99cb908e8049f208b594921c83f8ebd9d1dc3efa..bcc33dc01a95f76b64fcb3a8a63ad3225c3e1ca3 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;