diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-macro.h | 11 | ||||
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h index 478d3ab..d13890a 100644 --- a/gcc/rust/ast/rust-macro.h +++ b/gcc/rust/ast/rust-macro.h @@ -906,4 +906,15 @@ private: } // namespace AST } // namespace Rust +/* <https://stackoverflow.com/a/35304501> */ +namespace std { +template <> struct hash<Rust::AST::MacroFragSpec::Kind> +{ + 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 5dfe29f..7e6ab9b 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 <algorithm> namespace Rust { // Left binding powers of operations. |