about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-09 14:43:51 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-15 11:05:59 +0000
commit44c4a7b6c4a57e5e925d2156737bf9f003f583b4 (patch)
tree90526730ce6983b1297ed4f1c88b3fc3d6159bbc /compiler
parent83cc6204ec4b706eaf8183cac618715357d7cba1 (diff)
downloadrust-44c4a7b6c4a57e5e925d2156737bf9f003f583b4.tar.gz
rust-44c4a7b6c4a57e5e925d2156737bf9f003f583b4.zip
Remove an unnecessary `resolve_vars_if_possible`
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_hir_typeck/src/method/mod.rs7
1 files 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,