diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-09-08 13:51:57 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-09-11 07:53:48 -0700 |
| commit | caaf365a9d39e964d66d479f9be7c95bc017f156 (patch) | |
| tree | 1931db7a5ad12e0d802b2e1c3ab673e6bd473f8f /src/librustc/middle | |
| parent | ddd123ed9a35ec76103d42cecf322ee8d2896bf9 (diff) | |
| download | rust-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.rs | 4 |
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, }; |
