about summary refs log tree commit diff
path: root/clippy_lints/src/mem_replace.rs
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-04-07 19:44:10 +0200
committerflip1995 <hello@philkrones.com>2019-04-17 12:53:29 +0200
commit840eac2c05c31744f58e4a581ba838ac00a10cbc (patch)
treea5ef92c0d7281d62adf2ac2d2e261b39e444cdcb /clippy_lints/src/mem_replace.rs
parent2f100e04af6085a286caf6c4416733723bedac49 (diff)
Use {get,match}_def_path from LateContext
Diffstat (limited to 'clippy_lints/src/mem_replace.rs')
-rw-r--r--clippy_lints/src/mem_replace.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/mem_replace.rs b/clippy_lints/src/mem_replace.rs
index 57b05ab108c..855de165540 100644
--- a/clippy_lints/src/mem_replace.rs
+++ b/clippy_lints/src/mem_replace.rs
@@ -1,4 +1,4 @@
-use crate::utils::{match_def_path, match_qpath, paths, snippet_with_applicability, span_lint_and_sugg};
+use crate::utils::{match_qpath, paths, snippet_with_applicability, span_lint_and_sugg};
 use if_chain::if_chain;
 use rustc::hir::{Expr, ExprKind, MutMutable, QPath};
 use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
@@ -52,7 +52,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MemReplace {
             if func_args.len() == 2;
             if let ExprKind::Path(ref func_qpath) = func.node;
             if let Some(def_id) = cx.tables.qpath_def(func_qpath, func.hir_id).opt_def_id();
-            if match_def_path(cx.tcx, def_id, &paths::MEM_REPLACE);
+            if cx.match_def_path(def_id, &paths::MEM_REPLACE);
 
             // Check that second argument is `Option::None`
             if let ExprKind::Path(ref replacement_qpath) = func_args[1].node;