about summary refs log tree commit diff
path: root/src/librustc/middle
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-09-08 13:51:57 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-09-11 07:53:48 -0700
commitcaaf365a9d39e964d66d479f9be7c95bc017f156 (patch)
tree1931db7a5ad12e0d802b2e1c3ab673e6bd473f8f /src/librustc/middle
parentddd123ed9a35ec76103d42cecf322ee8d2896bf9 (diff)
downloadrust-caaf365a9d39e964d66d479f9be7c95bc017f156.tar.gz
rust-caaf365a9d39e964d66d479f9be7c95bc017f156.zip
rustc: Remove HirId from queries
This'll allow us to reconstruct query parameters purely from the `DepNode`
they're associated with. Some queries could move straight to `HirId` but others
that don't always have a correspondance between `HirId` and `DefId` moved to
two-level maps where the query operates over a `DefIndex`, returning a map,
which is then keyed off `ItemLocalId`.

Closes #44414
Diffstat (limited to 'src/librustc/middle')
-rw-r--r--src/librustc/middle/stability.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs
index ecf3aab05d8..477e48e0a3d 100644
--- a/src/librustc/middle/stability.rs
+++ b/src/librustc/middle/stability.rs
@@ -612,8 +612,8 @@ impl<'a, 'tcx> Visitor<'tcx> for Checker<'a, 'tcx> {
                 // compiler-generated `extern crate` items have a dummy span.
                 if item.span == DUMMY_SP { return }
 
-                let hir_id = self.tcx.hir.node_to_hir_id(item.id);
-                let cnum = match self.tcx.extern_mod_stmt_cnum(hir_id) {
+                let def_id = self.tcx.hir.local_def_id(item.id);
+                let cnum = match self.tcx.extern_mod_stmt_cnum(def_id) {
                     Some(cnum) => cnum,
                     None => return,
                 };