aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/autoderef.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/autoderef.rs')
-rw-r--r--crates/ra_hir_ty/src/autoderef.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/autoderef.rs b/crates/ra_hir_ty/src/autoderef.rs
index a6db7f623..d557962b4 100644
--- a/crates/ra_hir_ty/src/autoderef.rs
+++ b/crates/ra_hir_ty/src/autoderef.rs
@@ -55,7 +55,7 @@ fn deref_by_trait(
55 let target = db.trait_data(deref_trait).associated_type_by_name(&name::TARGET_TYPE)?; 55 let target = db.trait_data(deref_trait).associated_type_by_name(&name::TARGET_TYPE)?;
56 56
57 let generic_params = generics(db, target.into()); 57 let generic_params = generics(db, target.into());
58 if generic_params.count_params_including_parent() != 1 { 58 if generic_params.len() != 1 {
59 // the Target type + Deref trait should only have one generic parameter, 59 // the Target type + Deref trait should only have one generic parameter,
60 // namely Deref's Self type 60 // namely Deref's Self type
61 return None; 61 return None;