diff options
| author | Ben Kimock <kimockb@gmail.com> | 2023-04-07 23:11:20 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2023-04-18 10:52:47 -0400 |
| commit | 0445fbdd835c92156e4d06e42ce99a39e9315343 (patch) | |
| tree | 98214d1ae76737d58e423427cd7384b1f276230c /compiler/rustc_codegen_ssa/src/debuginfo | |
| parent | de96f3d8735b70d5dc1ca178aaee198b329b8f3d (diff) | |
| download | rust-0445fbdd835c92156e4d06e42ce99a39e9315343.tar.gz rust-0445fbdd835c92156e4d06e42ce99a39e9315343.zip | |
Store hashes in special types so they aren't accidentally encoded as numbers
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index f2469fde3b6..03f33d8d8aa 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -12,7 +12,7 @@ // * `"` is treated as the start of a string. use rustc_data_structures::fx::FxHashSet; -use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; +use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher}; use rustc_hir::def_id::DefId; use rustc_hir::definitions::{DefPathData, DefPathDataName, DisambiguatedDefPathData}; use rustc_hir::{AsyncGeneratorKind, GeneratorKind, Mutability}; @@ -675,8 +675,7 @@ 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) }); - let hash: u64 = hasher.finish(); - hash + hasher.finish::<Hash64>() }); if cpp_like_debuginfo(tcx) { |
