diff options
author | Florian Diebold <[email protected]> | 2019-11-30 11:35:37 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-11-30 11:57:32 +0000 |
commit | cf6809645e2327e20edd30eb535d4f06fa116b5c (patch) | |
tree | d39c0827865f5e82d82da94bc595580ad811502b /crates/ra_hir_ty/src/infer/path.rs | |
parent | 7cecd0f331419439417f98d92b839c9aaa06ed86 (diff) |
Handle cycles in impl types better
- impl Trait<Self> for S is allowed
- impl Trait for S<Self> is an invalid cycle, but we can add cycle recovery for
it in Salsa now
Diffstat (limited to 'crates/ra_hir_ty/src/infer/path.rs')
-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 14be66836..bbf146418 100644 --- a/crates/ra_hir_ty/src/infer/path.rs +++ b/crates/ra_hir_ty/src/infer/path.rs | |||
@@ -244,7 +244,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
244 | ContainerId::ImplId(it) => it, | 244 | ContainerId::ImplId(it) => it, |
245 | _ => return None, | 245 | _ => return None, |
246 | }; | 246 | }; |
247 | let self_ty = self.db.impl_ty(impl_id).self_type().clone(); | 247 | let self_ty = self.db.impl_self_ty(impl_id).clone(); |
248 | let self_ty_substs = self_ty.substs()?; | 248 | let self_ty_substs = self_ty.substs()?; |
249 | let actual_substs = actual_def_ty.substs()?; | 249 | let actual_substs = actual_def_ty.substs()?; |
250 | 250 | ||