about summary refs log tree commit diff
path: root/clippy_lints/src/default.rs
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2021-01-18 13:36:32 -0600
committerCameron Steffen <cam.steffen94@gmail.com>2021-01-18 14:54:58 -0600
commit2454408318814a2451b0698fa6d1cbffcaafda5f (patch)
treefc20246b5a8c57f325f62fdc0daf9acb38f8a428 /clippy_lints/src/default.rs
parent9009f8f0319fb0f1a9ef712e6f379c2bfda2d101 (diff)
Remove qpath_res util function
Diffstat (limited to 'clippy_lints/src/default.rs')
-rw-r--r--clippy_lints/src/default.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/default.rs b/clippy_lints/src/default.rs
index f7224811e6e..6fa1378b8c7 100644
--- a/clippy_lints/src/default.rs
+++ b/clippy_lints/src/default.rs
@@ -1,5 +1,5 @@
 use crate::utils::{
-    any_parent_is_automatically_derived, contains_name, match_def_path, paths, qpath_res, snippet_with_macro_callsite,
+    any_parent_is_automatically_derived, contains_name, match_def_path, paths, snippet_with_macro_callsite,
 };
 use crate::utils::{span_lint_and_note, span_lint_and_sugg};
 use if_chain::if_chain;
@@ -231,7 +231,7 @@ fn is_expr_default<'tcx>(expr: &'tcx Expr<'tcx>, cx: &LateContext<'tcx>) -> bool
     if_chain! {
         if let ExprKind::Call(ref fn_expr, _) = &expr.kind;
         if let ExprKind::Path(qpath) = &fn_expr.kind;
-        if let Res::Def(_, def_id) = qpath_res(cx, qpath, fn_expr.hir_id);
+        if let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id);
         then {
             // right hand side of assignment is `Default::default`
             match_def_path(cx, def_id, &paths::DEFAULT_TRAIT_METHOD)