Skip to content

Commit 7b5a366

Browse files
committed
Remove byte swap of valtree hash on big endian
1 parent 2efc90e commit 7b5a366

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,8 @@ fn push_const_param<'tcx>(tcx: TyCtxt<'tcx>, ct: ty::Const<'tcx>, output: &mut S
666666
hcx.while_hashing_spans(false, |hcx| {
667667
ct.to_valtree().hash_stable(hcx, &mut hasher)
668668
});
669-
// Note: Don't use `StableHashResult` impl of `u64` here directly, since that
670-
// would lead to endianness problems.
671-
let hash: u128 = hasher.finish();
672-
(hash.to_le() as u64).to_le()
669+
let hash: u64 = hasher.finish();
670+
hash
673671
});
674672

675673
if cpp_like_debuginfo(tcx) {

0 commit comments

Comments
 (0)