diff options
| author | bors <bors@rust-lang.org> | 2017-09-11 15:35:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-09-11 15:35:35 +0000 |
| commit | efa3ec67e28ab8a4c3377a039095cd464713cdfd (patch) | |
| tree | 67a3845b7aad9cfb60930ee4aba2c1cf6ebb693c /src/librustc_metadata | |
| parent | 19d30fcdb28c2a4f57774b827b1a17ee156b5c56 (diff) | |
| parent | caaf365a9d39e964d66d479f9be7c95bc017f156 (diff) | |
| download | rust-efa3ec67e28ab8a4c3377a039095cd464713cdfd.tar.gz rust-efa3ec67e28ab8a4c3377a039095cd464713cdfd.zip | |
Auto merge of #44435 - alexcrichton:in-scope, r=michaelwoerister
rustc: Remove HirId from queries This'll allow us to reconstruct query parameters purely from the `DepNode` they're associated with. Closes #44414
Diffstat (limited to 'src/librustc_metadata')
| -rw-r--r-- | src/librustc_metadata/cstore_impl.rs | 2 | ||||
| -rw-r--r-- | src/librustc_metadata/encoder.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/librustc_metadata/cstore_impl.rs b/src/librustc_metadata/cstore_impl.rs index c3742fc1d03..b1a5029a735 100644 --- a/src/librustc_metadata/cstore_impl.rs +++ b/src/librustc_metadata/cstore_impl.rs @@ -276,7 +276,7 @@ pub fn provide_local<'tcx>(providers: &mut Providers<'tcx>) { Rc::new(link_args::collect(tcx)) }, extern_mod_stmt_cnum: |tcx, id| { - let id = tcx.hir.definitions().find_node_for_hir_id(id); + let id = tcx.hir.as_local_node_id(id).unwrap(); tcx.sess.cstore.extern_mod_stmt_cnum_untracked(id) }, diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index 3b07177b1b5..641a567b56c 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -548,12 +548,11 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> { &hir::Visibility)>) -> Entry<'tcx> { let tcx = self.tcx; - let hir_id = tcx.hir.node_to_hir_id(id); let def_id = tcx.hir.local_def_id(id); debug!("IsolatedEncoder::encode_info_for_mod({:?})", def_id); let data = ModData { - reexports: match tcx.module_exports(hir_id) { + reexports: match tcx.module_exports(def_id) { Some(ref exports) if *vis == hir::Public => { self.lazy_seq_from_slice(exports.as_slice()) } |
