Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir-ty/src/method_resolution.rs2
-rw-r--r--crates/ide/src/goto_definition.rs26
2 files changed, 27 insertions, 1 deletions
diff --git a/crates/hir-ty/src/method_resolution.rs b/crates/hir-ty/src/method_resolution.rs
index 76c76ee6cf..d2081d22d7 100644
--- a/crates/hir-ty/src/method_resolution.rs
+++ b/crates/hir-ty/src/method_resolution.rs
@@ -615,7 +615,7 @@ fn find_matching_impl(
let wh_goals =
crate::chalk_db::convert_where_clauses(db, impl_.into(), &substs)
.into_iter()
- .map(|b| b.into_well_formed_goal(Interner).cast(Interner));
+ .map(|b| b.cast(Interner));
let goal = crate::Goal::all(Interner, wh_goals);
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs
index fb88d1ec84..e10789fd47 100644
--- a/crates/ide/src/goto_definition.rs
+++ b/crates/ide/src/goto_definition.rs
@@ -1445,6 +1445,32 @@ fn f() {
"#,
);
}
+ #[test]
+ fn wc_case_is_ok() {
+ check(
+ r#"
+trait G {
+ fn g(&self);
+}
+trait BParent{}
+trait Bound: BParent{}
+struct Gen<T>(T);
+impl <T> G for Gen<T>
+where T : Bound
+{
+ fn g(&self){
+ //^
+ }
+}
+struct A;
+impl Bound for A{}
+fn f() {
+ let gen = Gen::<A>(A);
+ gen.g$0();
+}
+"#,
+ );
+ }
#[test]
fn method_call_defaulted() {