https://gcc.gnu.org/g:12b3858d106fb3e80ae87b95897d4903af3c11cb
commit r16-227-g12b3858d106fb3e80ae87b95897d4903af3c11cb Author: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com> Date: Sun Apr 6 01:43:20 2025 +0200 gccrs: Add equality operator for identifiers gcc/rust/ChangeLog: * ast/rust-ast.h: Add equality operator. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com> Diff: --- 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 55f178d782c3..94585dc13442 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;