diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-05-01 11:05:40 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-05-01 11:05:40 -0400 |
| commit | d4d74dafe8e7ef059e27d69b4ec518fa0228f4b2 (patch) | |
| tree | 645d73706da1f942eb2d51a5ace5091ceb2675a9 | |
| parent | 6c2f64bdd8213012562f56e8fc393d99803e1c27 (diff) | |
| download | rust-d4d74dafe8e7ef059e27d69b4ec518fa0228f4b2.tar.gz rust-d4d74dafe8e7ef059e27d69b4ec518fa0228f4b2.zip | |
remove unused `is_fn`
| -rw-r--r-- | src/librustc/hir/map/mod.rs | 12 |
1 files changed, 0 insertions, 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), |
