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