Skip to content

Commit

Permalink
Add missing override specifier
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
P-E-P committed Nov 6, 2023
1 parent e009d3d commit 78ba5b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcc/rust/ast/rust-ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ class TraitItem : virtual public AssociatedItem
}

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
Expand Down
2 changes: 1 addition & 1 deletion gcc/rust/ast/rust-item.h
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@ class TraitItemConst : public TraitItem

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;

Expand Down

0 comments on commit 78ba5b7

Please sign in to comment.