Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 56d25ba

Browse files
committedDec 13, 2023
Auto merge of #118500 - ZetaNumbers:tcx_hir_refactor, r=petrochenkov
Move some methods from `tcx.hir()` to `tcx` #118256 (comment) Renamed: - 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
2 parents 2fdd9ed + 24f009c commit 56d25ba

File tree

122 files changed

+390
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+390
-393
lines changed
 

‎compiler/rustc_hir_analysis/src/astconv/lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2424
..
2525
}),
2626
..
27-
}) = tcx.hir().get_by_def_id(parent_id)
27+
}) = tcx.hir_node_by_def_id(parent_id)
2828
&& self_ty.hir_id == impl_self_ty.hir_id
2929
{
3030
if !of_trait_ref.trait_def_id().is_some_and(|def_id| def_id.is_local()) {

‎compiler/rustc_hir_analysis/src/astconv/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
27152715
let hir = tcx.hir();
27162716

27172717
let hir::Node::ImplItem(hir::ImplItem { kind: hir::ImplItemKind::Fn(..), ident, .. }) =
2718-
hir.get(fn_hir_id)
2718+
tcx.hir_node(fn_hir_id)
27192719
else {
27202720
return None;
27212721
};
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.