From 4a8279a21ad75ae2cb6d96746b8a880038ec0455 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 31 Jan 2020 15:34:43 +0100 Subject: Fix another test --- crates/ra_hir_ty/src/infer/path.rs | 6 +----- crates/ra_hir_ty/src/tests/method_resolution.rs | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'crates') 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> { AssocItemId::ConstId(c) => ValueNs::ConstId(c), AssocItemId::TypeAliasId(_) => unreachable!(), }; - let substs = Substs::build_for_def(self.db, item) - .use_parent_substs(&trait_ref.substs) - .fill_with_params() - .build(); self.write_assoc_resolution(id, item); - Some((def, Some(substs))) + Some((def, Some(trait_ref.substs))) } 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() { @r###" [107; 211) '{ ...>(); }': () [117; 118) 'a': (S, i64, u8) - [121; 150) '': fn make, i64, u8>() -> (Self, T, U) + [121; 150) '': fn make, i64, u8>() -> (S, i64, u8) [121; 152) '()': (S, i64, u8) [162; 163) 'b': (S, i64, u8) - [182; 206) 'Trait:...::': fn make, i64, u8>() -> (Self, T, U) + [182; 206) 'Trait:...::': fn make, i64, u8>() -> (S, i64, u8) [182; 208) 'Trait:...()': (S, i64, u8) "### ); -- cgit v1.2.3