HashStable_Generic for librustc_target.
This commit is contained in:
parent
a265bc22f1
commit
2ba84c6bea
4 changed files with 6 additions and 24 deletions
|
@ -3844,6 +3844,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"rustc_data_structures",
|
"rustc_data_structures",
|
||||||
"rustc_index",
|
"rustc_index",
|
||||||
|
"rustc_macros",
|
||||||
"serialize",
|
"serialize",
|
||||||
"syntax_pos",
|
"syntax_pos",
|
||||||
]
|
]
|
||||||
|
|
|
@ -17,29 +17,6 @@ use crate::hir::def_id::{DefId, CrateNum, CRATE_DEF_INDEX};
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
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 {
|
impl_stable_hash_for!(struct ::syntax::ast::Lit {
|
||||||
kind,
|
kind,
|
||||||
token,
|
token,
|
||||||
|
|
|
@ -12,6 +12,7 @@ path = "lib.rs"
|
||||||
bitflags = "1.2.1"
|
bitflags = "1.2.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||||
|
rustc_macros = { path = "../librustc_macros" }
|
||||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||||
syntax_pos = { path = "../libsyntax_pos" }
|
syntax_pos = { path = "../libsyntax_pos" }
|
||||||
rustc_index = { path = "../librustc_index" }
|
rustc_index = { path = "../librustc_index" }
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
use rustc_macros::HashStable_Generic;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
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 {
|
pub enum Abi {
|
||||||
// N.B., this ordering MUST match the AbiDatas array below.
|
// N.B., this ordering MUST match the AbiDatas array below.
|
||||||
// (This is ensured by the test indices_are_correct().)
|
// (This is ensured by the test indices_are_correct().)
|
||||||
|
|
Loading…
Add table
Reference in a new issue