diff options
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index b208d821d..caafeccb8 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -514,10 +514,9 @@ impl<'a> InferenceContext<'a> { | |||
514 | } | 514 | } |
515 | } | 515 | } |
516 | TypeNs::TypeAliasId(it) => { | 516 | TypeNs::TypeAliasId(it) => { |
517 | let substs = Substitution::build_for_def(self.db, it) | 517 | let ty = TyBuilder::def_ty(self.db, it.into()) |
518 | .fill(std::iter::repeat_with(|| self.table.new_type_var())) | 518 | .fill(std::iter::repeat_with(|| self.table.new_type_var())) |
519 | .build(); | 519 | .build(); |
520 | let ty = self.db.ty(it.into()).subst(&substs); | ||
521 | let variant = ty_variant(&ty); | 520 | let variant = ty_variant(&ty); |
522 | forbid_unresolved_segments((ty, variant), unresolved) | 521 | forbid_unresolved_segments((ty, variant), unresolved) |
523 | } | 522 | } |