about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorQiu Chaofan <qcf@ecnelises.com>2022-10-19 14:53:47 +0800
committerQiu Chaofan <qcf@ecnelises.com>2022-10-19 14:55:33 +0800
commit7b5a366c2aa8ed60965f234a5162f9c70c04a5f6 (patch)
treeb17d1cfe10a636f9b1c219577aeaeb8f5285c6df /compiler
parent2efc90e7381721df57348b61518b15794b75d189 (diff)
downloadrust-7b5a366c2aa8ed60965f234a5162f9c70c04a5f6.tar.gz
rust-7b5a366c2aa8ed60965f234a5162f9c70c04a5f6.zip
Remove byte swap of valtree hash on big endian
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
index 135ed680da2..e05646e1e86 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -666,10 +666,8 @@ fn push_const_param<'tcx>(tcx: TyCtxt<'tcx>, ct: ty::Const<'tcx>, output: &mut S
                     hcx.while_hashing_spans(false, |hcx| {
                         ct.to_valtree().hash_stable(hcx, &mut hasher)
                     });
-                    // Note: Don't use `StableHashResult` impl of `u64` here directly, since that
-                    // would lead to endianness problems.
-                    let hash: u128 = hasher.finish();
-                    (hash.to_le() as u64).to_le()
+                    let hash: u64 = hasher.finish();
+                    hash
                 });
 
                 if cpp_like_debuginfo(tcx) {