Skip to content

Commit 39dcfd9

Browse files
committed
fix
1 parent 895d0b8 commit 39dcfd9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc/ty/context.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,8 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
13341334
#[inline]
13351335
pub fn def_path_hash(self, def_id: DefId) -> hir_map::DefPathHash {
13361336
if def_id.is_local() {
1337-
self.hir().definitions().def_path_hash(def_id.index)
1337+
// FIXME: This is used when executing the hir query, can't use hir() here
1338+
self.hir_map.definitions().def_path_hash(def_id.index)
13381339
} else {
13391340
self.cstore.def_path_hash(def_id)
13401341
}
@@ -1373,11 +1374,11 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
13731374

13741375
#[inline(always)]
13751376
pub fn create_stable_hashing_context(self) -> StableHashingContext<'a> {
1377+
// FIXME: This is used when executing the hir query, can't use hir() here
13761378
let krate = self.gcx.hir_map.forest.untracked_krate();
1377-
13781379
StableHashingContext::new(self.sess,
13791380
krate,
1380-
self.hir().definitions(),
1381+
self.hir_map.definitions(),
13811382
self.cstore)
13821383
}
13831384

0 commit comments

Comments
 (0)