diff options
Diffstat (limited to 'gcc/rust/ast/rust-macro.h')
-rw-r--r-- | gcc/rust/ast/rust-macro.h | 11 |
1 files changed, 11 insertions, 0 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 |