From 7e1c1c154166d9eaa4184eab166b540e17ff26f3 Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Tue, 9 Feb 2021 19:38:40 -0600 Subject: [PATCH] Fix qpath_res call --- clippy_lints/src/use_self.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/use_self.rs b/clippy_lints/src/use_self.rs index 3dfec190541d..cdaa08be86b1 100644 --- a/clippy_lints/src/use_self.rs +++ b/clippy_lints/src/use_self.rs @@ -1,4 +1,4 @@ -use crate::utils::{in_macro, meets_msrv, qpath_res, snippet_opt, span_lint_and_sugg}; +use crate::utils::{in_macro, meets_msrv, snippet_opt, span_lint_and_sugg}; use if_chain::if_chain; use rustc_errors::Applicability; @@ -300,7 +300,7 @@ impl<'tcx> LateLintPass<'tcx> for UseSelf { } = fun { if expr_ty_matches(cx, expr, self_ty) { - let res = qpath_res(cx, qpath, fun.hir_id); + let res = cx.qpath_res(qpath, fun.hir_id); if let def::Res::Def(DefKind::Ctor(ctor_of, _), ..) = res { match ctor_of {