From d4d74dafe8e7ef059e27d69b4ec518fa0228f4b2 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 1 May 2017 11:05:40 -0400 Subject: [PATCH] remove unused `is_fn` --- src/librustc/hir/map/mod.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index cae5c5011ce..48b8a819fff 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -572,18 +572,6 @@ impl<'hir> Map<'hir> { } } - /// Check if the node is a non-closure function item - pub fn is_fn(&self, id: NodeId) -> bool { - let entry = if let Some(id) = self.find_entry(id) { id } else { return false }; - - match entry { - EntryItem(_, &Item { node: ItemFn(..), .. }) | - EntryTraitItem(_, &TraitItem { node: TraitItemKind::Method(..), .. }) | - EntryImplItem(_, &ImplItem { node: ImplItemKind::Method(..), .. }) => true, - _ => false, - } - } - /// If there is some error when walking the parents (e.g., a node does not /// have a parent in the map or a node can't be found), then we return the /// last good node id we found. Note that reaching the crate root (id == 0),