Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/method_resolution.rs')
-rw-r--r--crates/hir-ty/src/method_resolution.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/crates/hir-ty/src/method_resolution.rs b/crates/hir-ty/src/method_resolution.rs
index 86477f2c0b..f8aac3e63a 100644
--- a/crates/hir-ty/src/method_resolution.rs
+++ b/crates/hir-ty/src/method_resolution.rs
@@ -25,7 +25,6 @@ use hir_def::{
signatures::{ConstSignature, FunctionSignature},
unstable_features::UnstableFeatures,
};
-use intern::Symbol;
use rustc_hash::{FxHashMap, FxHashSet};
use rustc_type_ir::{
TypeVisitableExt,
@@ -224,8 +223,8 @@ impl<'db> InferenceTable<'db> {
pub(super) fn lookup_method_for_operator(
&self,
cause: ObligationCause,
- method_name: Symbol,
trait_def_id: TraitId,
+ method_item: FunctionId,
self_ty: Ty<'db>,
opt_rhs_ty: Option<Ty<'db>>,
treat_opaques: TreatNotYetDefinedOpaques,
@@ -278,13 +277,6 @@ impl<'db> InferenceTable<'db> {
// Trait must have a method named `m_name` and it should not have
// type parameters or early-bound regions.
let interner = self.interner();
- // We use `Ident::with_dummy_span` since no built-in operator methods have
- // any macro-specific hygiene, so the span's context doesn't really matter.
- let Some(method_item) =
- trait_def_id.trait_items(self.db).method_by_name(&Name::new_symbol_root(method_name))
- else {
- panic!("expected associated item for operator trait")
- };
let def_id = method_item;