diff options
author | Vincent Rouillé <[email protected]> | 2020-06-19 19:33:04 +0100 |
---|---|---|
committer | Vincent Rouillé <[email protected]> | 2020-06-19 19:33:04 +0100 |
commit | c95bb0ba7b0dd1e5f86d5df532502744eabe92e7 (patch) | |
tree | 7179f66aa080ccdd085fcccc149488537915e848 /crates/ra_hir_ty/src/infer | |
parent | 90a5c4626a4c46f7d5973e79dc68ab734d3b9349 (diff) |
Fix substs in resolve_value_path for ImplSelf
Fixes #4953.
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r-- | crates/ra_hir_ty/src/infer/path.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/infer/path.rs b/crates/ra_hir_ty/src/infer/path.rs index 1ad0d8397..80d7ed10e 100644 --- a/crates/ra_hir_ty/src/infer/path.rs +++ b/crates/ra_hir_ty/src/infer/path.rs | |||
@@ -81,7 +81,7 @@ impl<'a> InferenceContext<'a> { | |||
81 | let generics = crate::utils::generics(self.db.upcast(), impl_id.into()); | 81 | let generics = crate::utils::generics(self.db.upcast(), impl_id.into()); |
82 | let substs = Substs::type_params_for_generics(&generics); | 82 | let substs = Substs::type_params_for_generics(&generics); |
83 | let ty = self.db.impl_self_ty(impl_id).subst(&substs); | 83 | let ty = self.db.impl_self_ty(impl_id).subst(&substs); |
84 | if let Some((AdtId::StructId(struct_id), _)) = ty.as_adt() { | 84 | if let Some((AdtId::StructId(struct_id), substs)) = ty.as_adt() { |
85 | let ty = self.db.value_ty(struct_id.into()).subst(&substs); | 85 | let ty = self.db.value_ty(struct_id.into()).subst(&substs); |
86 | return Some(ty); | 86 | return Some(ty); |
87 | } else { | 87 | } else { |