|
11 | 11 | //! This module contains `HashStable` implementations for various data types
|
12 | 12 | //! from rustc::ty in no particular order.
|
13 | 13 |
|
14 |
| -use hir::def_id::DefId; |
15 |
| -use ich::{self, StableHashingContext, NodeIdHashingMode}; |
| 14 | +use ich::StableHashingContext; |
16 | 15 | use rustc_data_structures::stable_hasher::{HashStable, StableHasher,
|
17 | 16 | StableHasherResult};
|
18 | 17 | use std::hash as std_hash;
|
@@ -612,71 +611,6 @@ impl_stable_hash_for!(struct ty::ExistentialProjection<'tcx> {
|
612 | 611 | ty
|
613 | 612 | });
|
614 | 613 |
|
615 |
| - |
616 |
| -impl<'a, 'gcx, 'tcx> HashStable<StableHashingContext<'a, 'gcx, 'tcx>> |
617 |
| -for ty::TypeckTables<'gcx> { |
618 |
| - fn hash_stable<W: StableHasherResult>(&self, |
619 |
| - hcx: &mut StableHashingContext<'a, 'gcx, 'tcx>, |
620 |
| - hasher: &mut StableHasher<W>) { |
621 |
| - let ty::TypeckTables { |
622 |
| - local_id_root, |
623 |
| - ref type_dependent_defs, |
624 |
| - ref node_types, |
625 |
| - ref node_substs, |
626 |
| - ref adjustments, |
627 |
| - ref pat_binding_modes, |
628 |
| - ref upvar_capture_map, |
629 |
| - ref closure_tys, |
630 |
| - ref closure_kinds, |
631 |
| - ref liberated_fn_sigs, |
632 |
| - ref fru_field_types, |
633 |
| - |
634 |
| - ref cast_kinds, |
635 |
| - |
636 |
| - ref used_trait_imports, |
637 |
| - tainted_by_errors, |
638 |
| - ref free_region_map, |
639 |
| - } = *self; |
640 |
| - |
641 |
| - hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| { |
642 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, type_dependent_defs); |
643 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, node_types); |
644 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, node_substs); |
645 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, adjustments); |
646 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, pat_binding_modes); |
647 |
| - ich::hash_stable_hashmap(hcx, hasher, upvar_capture_map, |hcx, up_var_id| { |
648 |
| - let ty::UpvarId { |
649 |
| - var_id, |
650 |
| - closure_expr_id |
651 |
| - } = *up_var_id; |
652 |
| - |
653 |
| - let var_def_id = DefId { |
654 |
| - krate: local_id_root.krate, |
655 |
| - index: var_id, |
656 |
| - }; |
657 |
| - let closure_def_id = DefId { |
658 |
| - krate: local_id_root.krate, |
659 |
| - index: closure_expr_id, |
660 |
| - }; |
661 |
| - (hcx.def_path_hash(var_def_id), hcx.def_path_hash(closure_def_id)) |
662 |
| - }); |
663 |
| - |
664 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, closure_tys); |
665 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, closure_kinds); |
666 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, liberated_fn_sigs); |
667 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, fru_field_types); |
668 |
| - ich::hash_stable_itemlocalmap(hcx, hasher, cast_kinds); |
669 |
| - |
670 |
| - ich::hash_stable_hashset(hcx, hasher, used_trait_imports, |hcx, def_id| { |
671 |
| - hcx.def_path_hash(*def_id) |
672 |
| - }); |
673 |
| - |
674 |
| - tainted_by_errors.hash_stable(hcx, hasher); |
675 |
| - free_region_map.hash_stable(hcx, hasher); |
676 |
| - }) |
677 |
| - } |
678 |
| -} |
679 |
| - |
680 | 614 | impl_stable_hash_for!(enum ty::fast_reject::SimplifiedType {
|
681 | 615 | BoolSimplifiedType,
|
682 | 616 | CharSimplifiedType,
|
|
0 commit comments