From 78ba5b74fb0900b3ba00625839a5dc624e37c2c7 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Thu, 2 Nov 2023 18:10:32 +0100 Subject: Add missing override specifier 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 --- gcc/rust/ast/rust-ast.h | 2 +- gcc/rust/ast/rust-item.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index a2d088e..3561293 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -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 diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h index 99cb908..bcc33dc 100644 --- a/gcc/rust/ast/rust-item.h +++ b/gcc/rust/ast/rust-item.h @@ -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; -- cgit v1.1