From: Pierre-Emmanuel Patry <[email protected]>
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add equality operator.
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
gcc/rust/ast/rust-ast.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 55f178d782c..94585dc1344 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -57,6 +57,11 @@ public:
bool empty () const { return ident.empty (); }
+ bool operator== (const Identifier &other) const
+ {
+ return ident == other.ident;
+ }
+
private:
std::string ident;
location_t loc;
--
2.49.0