diff --git a/Cargo.lock b/Cargo.lock index 34bcba89261..4c1dfd59e42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3844,6 +3844,7 @@ dependencies = [ "log", "rustc_data_structures", "rustc_index", + "rustc_macros", "serialize", "syntax_pos", ] diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs index 42d6576ba6d..f8bf8f4ab8a 100644 --- a/src/librustc/ich/impls_syntax.rs +++ b/src/librustc/ich/impls_syntax.rs @@ -17,29 +17,6 @@ use crate::hir::def_id::{DefId, CrateNum, CRATE_DEF_INDEX}; use smallvec::SmallVec; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; -impl_stable_hash_for!(enum ::rustc_target::spec::abi::Abi { - Cdecl, - Stdcall, - Fastcall, - Vectorcall, - Thiscall, - Aapcs, - Win64, - SysV64, - PtxKernel, - Msp430Interrupt, - X86Interrupt, - AmdGpuKernel, - EfiApi, - Rust, - C, - System, - RustIntrinsic, - RustCall, - PlatformIntrinsic, - Unadjusted -}); - impl_stable_hash_for!(struct ::syntax::ast::Lit { kind, token, diff --git a/src/librustc_target/Cargo.toml b/src/librustc_target/Cargo.toml index c73d0adea38..0e0732490fb 100644 --- a/src/librustc_target/Cargo.toml +++ b/src/librustc_target/Cargo.toml @@ -12,6 +12,7 @@ path = "lib.rs" bitflags = "1.2.1" log = "0.4" rustc_data_structures = { path = "../librustc_data_structures" } +rustc_macros = { path = "../librustc_macros" } rustc_serialize = { path = "../libserialize", package = "serialize" } syntax_pos = { path = "../libsyntax_pos" } rustc_index = { path = "../librustc_index" } diff --git a/src/librustc_target/spec/abi.rs b/src/librustc_target/spec/abi.rs index 3a24d30966f..736358a995b 100644 --- a/src/librustc_target/spec/abi.rs +++ b/src/librustc_target/spec/abi.rs @@ -1,9 +1,12 @@ use std::fmt; +use rustc_macros::HashStable_Generic; + #[cfg(test)] mod tests; -#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable, + Clone, Copy, Debug, HashStable_Generic)] pub enum Abi { // N.B., this ordering MUST match the AbiDatas array below. // (This is ensured by the test indices_are_correct().)