rebase
This commit is contained in:
@@ -703,7 +703,8 @@ fn push_const_param<'tcx>(tcx: TyCtxt<'tcx>, ct: ty::Const<'tcx>, output: &mut S
|
||||
// but we get a deterministic, virtually unique value for the constant.
|
||||
let hcx = &mut tcx.create_stable_hashing_context();
|
||||
let mut hasher = StableHasher::new();
|
||||
hcx.while_hashing_spans(false, |hcx| ct.kind().hash_stable(hcx, &mut hasher));
|
||||
let ct = ct.eval(tcx, ty::ParamEnv::reveal_all());
|
||||
hcx.while_hashing_spans(false, |hcx| ct.to_valtree().hash_stable(hcx, &mut hasher));
|
||||
// Let's only emit 64 bits of the hash value. That should be plenty for
|
||||
// avoiding collisions and will make the emitted type names shorter.
|
||||
let hash: u64 = hasher.finish();
|
||||
|
||||
Reference in New Issue
Block a user