about summary refs log tree commit diff
path: root/clippy_lints/src/explicit_write.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/explicit_write.rs
parent2f100e04af6085a286caf6c4416733723bedac49 (diff)
downloadrust-840eac2c05c31744f58e4a581ba838ac00a10cbc.tar.gz
rust-840eac2c05c31744f58e4a581ba838ac00a10cbc.zip
Use {get,match}_def_path from LateContext
Diffstat (limited to 'clippy_lints/src/explicit_write.rs')
-rw-r--r--clippy_lints/src/explicit_write.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/explicit_write.rs b/clippy_lints/src/explicit_write.rs
index 64ba3efedc5..223c0022a66 100644
--- a/clippy_lints/src/explicit_write.rs
+++ b/clippy_lints/src/explicit_write.rs
@@ -1,4 +1,4 @@
-use crate::utils::{is_expn_of, match_def_path, resolve_node, span_lint, span_lint_and_sugg};
+use crate::utils::{is_expn_of, resolve_node, span_lint, span_lint_and_sugg};
 use if_chain::if_chain;
 use rustc::hir::*;
 use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
@@ -54,9 +54,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
             if let ExprKind::Path(ref qpath) = dest_fun.node;
             if let Some(dest_fun_id) =
                 resolve_node(cx, qpath, dest_fun.hir_id).opt_def_id();
-            if let Some(dest_name) = if match_def_path(cx.tcx, dest_fun_id, &["std", "io", "stdio", "stdout"]) {
+            if let Some(dest_name) = if cx.match_def_path(dest_fun_id, &["std", "io", "stdio", "stdout"]) {
                 Some("stdout")
-            } else if match_def_path(cx.tcx, dest_fun_id, &["std", "io", "stdio", "stderr"]) {
+            } else if cx.match_def_path(dest_fun_id, &["std", "io", "stdio", "stderr"]) {
                 Some("stderr")
             } else {
                 None