Skip to content

Commit 2803b38

Browse files
committed
rustc: use VstoreFixed's length in crate-independent type hashes.
1 parent b61764b commit 2803b38

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/librustc/middle/ty.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -4595,16 +4595,6 @@ pub fn hash_crate_independent(tcx: &ctxt, t: t, svh: &Svh) -> u64 {
45954595
}
45964596
}
45974597
};
4598-
let vstore = |state: &mut sip::SipState, v: Vstore| {
4599-
match v {
4600-
VstoreFixed(_) => 0u8.hash(state),
4601-
VstoreUniq => 1u8.hash(state),
4602-
VstoreSlice(r) => {
4603-
2u8.hash(state);
4604-
region(state, r);
4605-
}
4606-
}
4607-
};
46084598
let did = |state: &mut sip::SipState, did: DefId| {
46094599
let h = if ast_util::is_local(did) {
46104600
svh.clone()
@@ -4652,7 +4642,7 @@ pub fn hash_crate_independent(tcx: &ctxt, t: t, svh: &Svh) -> u64 {
46524642
ty_vec(m, v) => {
46534643
byte!(11);
46544644
mt(&mut state, m);
4655-
vstore(&mut state, v);
4645+
hash!(v);
46564646
}
46574647
ty_ptr(m) => {
46584648
byte!(12);

0 commit comments

Comments
 (0)