diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-02-08 15:06:31 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-02-08 16:48:01 -0500 |
| commit | 619051e4f080e3f3ccb94d7789bbef58282e64a7 (patch) | |
| tree | d8cbede004c8bac2f52795c5d2d5d5b8bf3a6ded /src/librustc/ich | |
| parent | fb29dfcc9ada6ed10308b6e7f405569f61a9af0b (diff) | |
| download | rust-619051e4f080e3f3ccb94d7789bbef58282e64a7.tar.gz rust-619051e4f080e3f3ccb94d7789bbef58282e64a7.zip | |
Move librustc_hir/def_id.rs to librustc_span/def_id.rs
For noww, librustc_hir re-exports the `def_id` module from librustc_span, so the rest of rustc can continue to reference rustc_hir::def_id
Diffstat (limited to 'src/librustc/ich')
| -rw-r--r-- | src/librustc/ich/hcx.rs | 6 | ||||
| -rw-r--r-- | src/librustc/ich/impls_hir.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/ich/hcx.rs b/src/librustc/ich/hcx.rs index aade4c3f74c..76e4b5f01b7 100644 --- a/src/librustc/ich/hcx.rs +++ b/src/librustc/ich/hcx.rs @@ -249,6 +249,12 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> { self.hash_spans } + #[inline] + fn hash_def_id(&mut self, def_id: DefId, hasher: &mut StableHasher) { + let hcx = self; + hcx.def_path_hash(def_id).hash_stable(hcx, hasher); + } + fn byte_pos_to_line_and_col( &mut self, byte: BytePos, diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc/ich/impls_hir.rs index 01558615497..625d8a4670f 100644 --- a/src/librustc/ich/impls_hir.rs +++ b/src/librustc/ich/impls_hir.rs @@ -12,12 +12,6 @@ use std::mem; impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> { #[inline] - fn hash_def_id(&mut self, def_id: DefId, hasher: &mut StableHasher) { - let hcx = self; - hcx.def_path_hash(def_id).hash_stable(hcx, hasher); - } - - #[inline] fn hash_hir_id(&mut self, hir_id: hir::HirId, hasher: &mut StableHasher) { let hcx = self; match hcx.node_id_hashing_mode { |
