about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-13 06:27:40 +0100
committerGitHub <noreply@github.com>2024-02-13 06:27:40 +0100
commit7427460ea9794d6fc0e401819fa7597cf46c163e (patch)
treefeb260eb00378b3cc3f3f3eb6872cd161b717472
parent5d1e919db45add4d950e2f97a1a919b18ed06700 (diff)
parentc51b9ff8ba0318755db4d0787206e732688fbdc5 (diff)
downloadrust-7427460ea9794d6fc0e401819fa7597cf46c163e.tar.gz
rust-7427460ea9794d6fc0e401819fa7597cf46c163e.zip
Rollup merge of #120987 - tshepang:redundant, r=compiler-errors
remove redundant logic

Made redundant in 3f697b85f2196ea7d2a5d4fa1f88c39e63871d39
-rw-r--r--compiler/rustc_hir_typeck/src/method/suggest.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs
index ab5c0f32705..986397e58cb 100644
--- a/compiler/rustc_hir_typeck/src/method/suggest.rs
+++ b/compiler/rustc_hir_typeck/src/method/suggest.rs
@@ -1073,12 +1073,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                                         // for instance
                                         self.tcx.at(span).type_of(*def_id).instantiate_identity()
                                             != rcvr_ty
-                                            && self
-                                                .tcx
-                                                .at(span)
-                                                .type_of(*def_id)
-                                                .instantiate_identity()
-                                                != rcvr_ty
                                     }
                                     (Mode::Path, false, _) => true,
                                     _ => false,