HashStable_Generic for librustc_target.
This commit is contained in:
parent
a265bc22f1
commit
2ba84c6bea
@ -3844,6 +3844,7 @@ dependencies = [
|
||||
"log",
|
||||
"rustc_data_structures",
|
||||
"rustc_index",
|
||||
"rustc_macros",
|
||||
"serialize",
|
||||
"syntax_pos",
|
||||
]
|
||||
|
@ -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,
|
||||
|
@ -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" }
|
||||
|
@ -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().)
|
||||
|
Loading…
Reference in New Issue
Block a user