diff options
| author | zetanumbers <dariasukhonina@gmail.com> | 2023-12-01 05:28:34 -0800 |
|---|---|---|
| committer | zetanumbers <dariasukhonina@gmail.com> | 2023-12-12 06:40:29 -0800 |
| commit | 24f009c5e55d18c12563dd74681ca33b8a349936 (patch) | |
| tree | 0213624c5633448b305008c7b5683799cdde4996 /src/librustdoc/visit_ast.rs | |
| parent | 27d8a577138c0d319a572cd1a464c2b755e577de (diff) | |
| download | rust-24f009c5e55d18c12563dd74681ca33b8a349936.tar.gz rust-24f009c5e55d18c12563dd74681ca33b8a349936.zip | |
Move some methods from `tcx.hir()` to `tcx`
Renamings: - find -> opt_hir_node - get -> hir_node - find_by_def_id -> opt_hir_node_by_def_id - get_by_def_id -> hir_node_by_def_id Fix rebase changes using removed methods Use `tcx.hir_node_by_def_id()` whenever possible in compiler Fix clippy errors Fix compiler Apply suggestions from code review Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id`
Diffstat (limited to 'src/librustdoc/visit_ast.rs')
| -rw-r--r-- | src/librustdoc/visit_ast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index bef151745d8..bbc7e5b48d1 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -275,7 +275,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { }; let is_private = !self.cx.cache.effective_visibilities.is_directly_public(tcx, ori_res_did); - let item = tcx.hir().get_by_def_id(res_did); + let item = tcx.hir_node_by_def_id(res_did); if !please_inline { let inherits_hidden = !document_hidden && inherits_doc_hidden(tcx, res_did, None); |
