diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h index 478d3ab2f11..d13890a473a 100644 --- a/gcc/rust/ast/rust-macro.h +++ b/gcc/rust/ast/rust-macro.h @@ -906,4 +906,15 @@ private: } // namespace AST } // namespace Rust +/* */ +namespace std { +template <> struct hash +{ + size_t operator() (const Rust::AST::MacroFragSpec::Kind &t) const noexcept + { + return size_t (t); + } +}; +} // namespace std + #endif diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 5dfe29f4e90..7e6ab9b0287 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -20,9 +20,9 @@ along with GCC; see the file COPYING3. If not see /* DO NOT INCLUDE ANYWHERE - this is automatically included with rust-parse.h * This is also the reason why there are no include guards. */ +#define INCLUDE_ALGORITHM #include "rust-diagnostics.h" #include "util/rust-make-unique.h" -#include namespace Rust { // Left binding powers of operations.