Store hashes in special types so they aren't accidentally encoded as numbers
This commit is contained in:
parent
de96f3d873
commit
0445fbdd83
38 changed files with 274 additions and 138 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue