Skip to content

Commit 2ba84c6

Browse files
committed
HashStable_Generic for librustc_target.
1 parent a265bc2 commit 2ba84c6

File tree

4 files changed

+6
-24
lines changed

4 files changed

+6
-24
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3844,6 +3844,7 @@ dependencies = [
38443844
"log",
38453845
"rustc_data_structures",
38463846
"rustc_index",
3847+
"rustc_macros",
38473848
"serialize",
38483849
"syntax_pos",
38493850
]

src/librustc/ich/impls_syntax.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,6 @@ use crate::hir::def_id::{DefId, CrateNum, CRATE_DEF_INDEX};
1717
use smallvec::SmallVec;
1818
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1919

20-
impl_stable_hash_for!(enum ::rustc_target::spec::abi::Abi {
21-
Cdecl,
22-
Stdcall,
23-
Fastcall,
24-
Vectorcall,
25-
Thiscall,
26-
Aapcs,
27-
Win64,
28-
SysV64,
29-
PtxKernel,
30-
Msp430Interrupt,
31-
X86Interrupt,
32-
AmdGpuKernel,
33-
EfiApi,
34-
Rust,
35-
C,
36-
System,
37-
RustIntrinsic,
38-
RustCall,
39-
PlatformIntrinsic,
40-
Unadjusted
41-
});
42-
4320
impl_stable_hash_for!(struct ::syntax::ast::Lit {
4421
kind,
4522
token,

src/librustc_target/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ path = "lib.rs"
1212
bitflags = "1.2.1"
1313
log = "0.4"
1414
rustc_data_structures = { path = "../librustc_data_structures" }
15+
rustc_macros = { path = "../librustc_macros" }
1516
rustc_serialize = { path = "../libserialize", package = "serialize" }
1617
syntax_pos = { path = "../libsyntax_pos" }
1718
rustc_index = { path = "../librustc_index" }

src/librustc_target/spec/abi.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
use std::fmt;
22

3+
use rustc_macros::HashStable_Generic;
4+
35
#[cfg(test)]
46
mod tests;
57

6-
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)]
8+
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable,
9+
Clone, Copy, Debug, HashStable_Generic)]
710
pub enum Abi {
811
// N.B., this ordering MUST match the AbiDatas array below.
912
// (This is ensured by the test indices_are_correct().)

0 commit comments

Comments
 (0)