aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir_ty/src/infer/path.rs6
-rw-r--r--crates/ra_hir_ty/src/tests/method_resolution.rs4
2 files changed, 3 insertions, 7 deletions
diff --git a/crates/ra_hir_ty/src/infer/path.rs b/crates/ra_hir_ty/src/infer/path.rs
index 39aa346eb..fcf13b0b3 100644
--- a/crates/ra_hir_ty/src/infer/path.rs
+++ b/crates/ra_hir_ty/src/infer/path.rs
@@ -177,13 +177,9 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
177 AssocItemId::ConstId(c) => ValueNs::ConstId(c), 177 AssocItemId::ConstId(c) => ValueNs::ConstId(c),
178 AssocItemId::TypeAliasId(_) => unreachable!(), 178 AssocItemId::TypeAliasId(_) => unreachable!(),
179 }; 179 };
180 let substs = Substs::build_for_def(self.db, item)
181 .use_parent_substs(&trait_ref.substs)
182 .fill_with_params()
183 .build();
184 180
185 self.write_assoc_resolution(id, item); 181 self.write_assoc_resolution(id, item);
186 Some((def, Some(substs))) 182 Some((def, Some(trait_ref.substs)))
187 } 183 }
188 184
189 fn resolve_ty_assoc_item( 185 fn resolve_ty_assoc_item(
diff --git a/crates/ra_hir_ty/src/tests/method_resolution.rs b/crates/ra_hir_ty/src/tests/method_resolution.rs
index 6c7f6706a..446d12813 100644
--- a/crates/ra_hir_ty/src/tests/method_resolution.rs
+++ b/crates/ra_hir_ty/src/tests/method_resolution.rs
@@ -651,10 +651,10 @@ fn test() {
651 @r###" 651 @r###"
652 [107; 211) '{ ...>(); }': () 652 [107; 211) '{ ...>(); }': ()
653 [117; 118) 'a': (S<u64>, i64, u8) 653 [117; 118) 'a': (S<u64>, i64, u8)
654 [121; 150) '<S as ...::<u8>': fn make<S<u64>, i64, u8>() -> (Self, T, U) 654 [121; 150) '<S as ...::<u8>': fn make<S<u64>, i64, u8>() -> (S<u64>, i64, u8)
655 [121; 152) '<S as ...<u8>()': (S<u64>, i64, u8) 655 [121; 152) '<S as ...<u8>()': (S<u64>, i64, u8)
656 [162; 163) 'b': (S<u64>, i64, u8) 656 [162; 163) 'b': (S<u64>, i64, u8)
657 [182; 206) 'Trait:...::<u8>': fn make<S<u64>, i64, u8>() -> (Self, T, U) 657 [182; 206) 'Trait:...::<u8>': fn make<S<u64>, i64, u8>() -> (S<u64>, i64, u8)
658 [182; 208) 'Trait:...<u8>()': (S<u64>, i64, u8) 658 [182; 208) 'Trait:...<u8>()': (S<u64>, i64, u8)
659 "### 659 "###
660 ); 660 );