From 44c4a7b6c4a57e5e925d2156737bf9f003f583b4 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 9 Nov 2022 14:43:51 +0000 Subject: [PATCH] Remove an unnecessary `resolve_vars_if_possible` --- compiler/rustc_hir_typeck/src/method/mod.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_hir_typeck/src/method/mod.rs b/compiler/rustc_hir_typeck/src/method/mod.rs index e7e0a3a23a2..a067b0d6c18 100644 --- a/compiler/rustc_hir_typeck/src/method/mod.rs +++ b/compiler/rustc_hir_typeck/src/method/mod.rs @@ -93,10 +93,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { call_expr_id: hir::HirId, allow_private: bool, ) -> bool { - let mode = probe::Mode::MethodCall; match self.probe_for_name( method_name.span, - mode, + probe::Mode::MethodCall, method_name, IsSuggestion(false), self_ty, @@ -253,11 +252,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { call_expr: &'tcx hir::Expr<'tcx>, scope: ProbeScope, ) -> probe::PickResult<'tcx> { - let mode = probe::Mode::MethodCall; - let self_ty = self.resolve_vars_if_possible(self_ty); self.probe_for_name( span, - mode, + probe::Mode::MethodCall, method_name, IsSuggestion(false), self_ty,