From: Pierre-Emmanuel Patry Date: Wed, 1 Oct 2025 14:24:18 +0000 (+0200) Subject: gccrs: Add override modifier X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bff55b79b396852a6df8b7809693f1a161b9615f;p=thirdparty%2Fgcc.git gccrs: Add override modifier gcc/rust/ChangeLog: * ast/rust-ast.h: Add missing override modifier. * ast/rust-path.h: Likewise. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index f14136f445b..8a7e618b05c 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -1777,7 +1777,7 @@ public: return std::unique_ptr (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; } }; diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index 88b5327c33c..be04882ed6a 100644 --- a/gcc/rust/ast/rust-path.h +++ b/gcc/rust/ast/rust-path.h @@ -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; }