about summary refs log tree commit diff
path: root/src/librustc_mir/transform
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-25 17:15:36 +0200
committerGitHub <noreply@github.com>2019-06-25 17:15:36 +0200
commitabc7423f27cebb55ea9cbc67b3edc8cbcaa5e0eb (patch)
treea9456be8ebd20d834fb93d7f8d67c394f331b1ca /src/librustc_mir/transform
parent6070e2e87616d8b2ae9ea58c800a79be936b9aab (diff)
parent87438a163ec153e2322b70e8c5c987c7c89be0b4 (diff)
downloadrust-abc7423f27cebb55ea9cbc67b3edc8cbcaa5e0eb.tar.gz
rust-abc7423f27cebb55ea9cbc67b3edc8cbcaa5e0eb.zip
Rollup merge of #62091 - ljedrz:hiridification_almost_there, r=Zoxc
HirIdification: almost there

I'm beginning to run out of stuff to HirIdify :wink:.

This time I targeted mainly `hir::map::{find, get_parent_node}`, but a few other bits got changed too.

r? @Zoxc
Diffstat (limited to 'src/librustc_mir/transform')
-rw-r--r--src/librustc_mir/transform/check_unsafety.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/transform/check_unsafety.rs b/src/librustc_mir/transform/check_unsafety.rs
index 9c78d761cb2..24df3549be4 100644
--- a/src/librustc_mir/transform/check_unsafety.rs
+++ b/src/librustc_mir/transform/check_unsafety.rs
@@ -570,14 +570,14 @@ fn is_enclosed(
     used_unsafe: &FxHashSet<hir::HirId>,
     id: hir::HirId,
 ) -> Option<(String, hir::HirId)> {
-    let parent_id = tcx.hir().get_parent_node_by_hir_id(id);
+    let parent_id = tcx.hir().get_parent_node(id);
     if parent_id != id {
         if used_unsafe.contains(&parent_id) {
             Some(("block".to_string(), parent_id))
         } else if let Some(Node::Item(&hir::Item {
             node: hir::ItemKind::Fn(_, header, _, _),
             ..
-        })) = tcx.hir().find_by_hir_id(parent_id) {
+        })) = tcx.hir().find(parent_id) {
             match header.unsafety {
                 hir::Unsafety::Unsafe => Some(("fn".to_string(), parent_id)),
                 hir::Unsafety::Normal => None,