Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/builder.rs')
| -rw-r--r-- | crates/hir-ty/src/builder.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir-ty/src/builder.rs b/crates/hir-ty/src/builder.rs index 163510602b..8c3665dfc8 100644 --- a/crates/hir-ty/src/builder.rs +++ b/crates/hir-ty/src/builder.rs @@ -76,7 +76,7 @@ impl<D> TyBuilder<D> { } let subst = Substitution::from_iter( Interner, - self.vec.into_iter().chain(self.parent_subst.iter(Interner).cloned()), + self.parent_subst.iter(Interner).cloned().chain(self.vec), ); (self.data, subst) } @@ -278,8 +278,10 @@ impl TyBuilder<()> { }; Substitution::from_iter( Interner, - self_subst - .chain(generics(db, parent).placeholder_subst(db).iter(Interner)) + generics(db, parent) + .placeholder_subst(db) + .iter(Interner) + .chain(self_subst) .cloned() .collect::<Vec<_>>(), ) |