From 4a6914bb8c46e58990f0197212319f8ce1495737 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 25 Jun 2019 14:34:47 -0700 Subject: [PATCH] Remove a hir_to_node_id --- clippy_lints/src/escape.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/escape.rs b/clippy_lints/src/escape.rs index 4b87ce7cb9b..e31ff586518 100644 --- a/clippy_lints/src/escape.rs +++ b/clippy_lints/src/escape.rs @@ -113,7 +113,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> { fn matched_pat(&mut self, _: &Pat, _: &cmt_<'tcx>, _: MatchMode) {} fn consume_pat(&mut self, consume_pat: &Pat, cmt: &cmt_<'tcx>, _: ConsumeMode) { let map = &self.cx.tcx.hir(); - if map.is_argument(map.hir_to_node_id(consume_pat.hir_id)) { + if map.is_argument(consume_pat.hir_id) { // Skip closure arguments if let Some(Node::Expr(..)) = map.find(map.get_parent_node(consume_pat.hir_id)) { return;