diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-22 01:42:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-22 01:42:38 +0200 |
| commit | dc0ef823be3c676e4caa99f53e37413a1b2209ec (patch) | |
| tree | 473d53aceab6efe4b9554824e7695197e3f96599 /src/librustdoc | |
| parent | 9eb88f3b821ec5ca276e2f5d5c4f41dc3e9f0e87 (diff) | |
| parent | 0a511cce79c41eeddbdc0623581e61872f97793c (diff) | |
| download | rust-dc0ef823be3c676e4caa99f53e37413a1b2209ec.tar.gz rust-dc0ef823be3c676e4caa99f53e37413a1b2209ec.zip | |
Rollup merge of #61984 - ljedrz:more_node_id_pruning, r=Zoxc
More NodeId pruning Just another round of the `HirId`ification initiative. r? @Zoxc
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/passes/collect_intra_doc_links.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/visit_ast.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index 68b96a40829..e6f09927796 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -246,7 +246,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { match parent_node.or(self.mod_ids.last().cloned()) { Some(parent) if parent != hir::CRATE_HIR_ID => { // FIXME: can we pull the parent module's name from elsewhere? - Some(self.cx.tcx.hir().name_by_hir_id(parent).to_string()) + Some(self.cx.tcx.hir().name(parent).to_string()) } _ => None, } diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index c94149d3102..781e62c3b27 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -337,7 +337,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { if !self.view_item_stack.insert(res_hir_id) { return false } - let ret = match tcx.hir().get_by_hir_id(res_hir_id) { + let ret = match tcx.hir().get(res_hir_id) { Node::Item(&hir::Item { node: hir::ItemKind::Mod(ref m), .. }) if glob => { let prev = mem::replace(&mut self.inlining, true); for i in &m.item_ids { |
