From: Pierre-Emmanuel Patry Date: Sat, 5 Apr 2025 23:43:20 +0000 (+0200) Subject: gccrs: Add equality operator for identifiers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12b3858d106fb3e80ae87b95897d4903af3c11cb;p=thirdparty%2Fgcc.git gccrs: Add equality operator for identifiers gcc/rust/ChangeLog: * ast/rust-ast.h: Add equality operator. Signed-off-by: Pierre-Emmanuel Patry --- 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;