Replace some u64 hashes with Hash64
This commit is contained in:
parent
fc147b4a81
commit
1d7cf0ff40
6 changed files with 25 additions and 15 deletions
|
@ -7,6 +7,7 @@ use rustc_abi::{
|
|||
PointeeInfo, PointerKind, Primitive, ReprOptions, Scalar, Size, TagEncoding, TargetDataLayout,
|
||||
TyAbiInterface, VariantIdx, Variants,
|
||||
};
|
||||
use rustc_data_structures::stable_hasher::Hash64;
|
||||
use rustc_error_messages::DiagMessage;
|
||||
use rustc_errors::{
|
||||
Diag, DiagArgValue, DiagCtxtHandle, Diagnostic, EmissionGuarantee, IntoDiagArg, Level,
|
||||
|
@ -778,7 +779,7 @@ where
|
|||
size: Size::ZERO,
|
||||
max_repr_align: None,
|
||||
unadjusted_abi_align: tcx.data_layout.i8_align.abi,
|
||||
randomization_seed: 0,
|
||||
randomization_seed: Hash64::ZERO,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1487,8 +1487,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
|
||||
// Generate a deterministically-derived seed from the item's path hash
|
||||
// to allow for cross-crate compilation to actually work
|
||||
let mut field_shuffle_seed =
|
||||
self.def_path_hash(did.to_def_id()).0.to_smaller_hash().as_u64();
|
||||
let mut field_shuffle_seed = self.def_path_hash(did.to_def_id()).0.to_smaller_hash();
|
||||
|
||||
// If the user defined a custom seed for layout randomization, xor the item's
|
||||
// path hash with the user defined seed, this will allowing determinism while
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue