Skip to content

Commit b176f86

Browse files
committed
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 <[email protected]> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id`
1 parent 611a359 commit b176f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/miri.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
144144
// Otherwise it may cause unexpected behaviours and ICEs
145145
// (https://github.com/rust-lang/rust/issues/86261).
146146
let is_reachable_non_generic = matches!(
147-
tcx.hir().get(tcx.local_def_id_to_hir_id(local_def_id)),
147+
tcx.hir_node_by_def_id(local_def_id),
148148
Node::Item(&hir::Item {
149149
kind: hir::ItemKind::Static(..) | hir::ItemKind::Fn(..),
150150
..

0 commit comments

Comments
 (0)