From 4490d49331a092775ebd3d38bec14b2eb7d98998 Mon Sep 17 00:00:00 2001 From: SimplyTheOther Date: Sun, 13 Dec 2020 16:20:57 +0800 Subject: Fixed SimplePath's operator == not being const --- gcc/rust/ast/rust-ast.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust') diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 1ad0cf9..bdc1f12 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -327,7 +327,7 @@ public: // does this need visitor if not polymorphic? probably not // path-to-string comparison operator - bool operator== (const std::string &rhs) + bool operator== (const std::string &rhs) const { return !has_opening_scope_resolution && segments.size () == 1 && segments[0].as_string () == rhs; -- cgit v1.1