Skip to content

Commit dc0b581

Browse files
committed
Fix subst_prefix
1 parent 5794a09 commit dc0b581

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/hir_ty/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ pub type WhereClause = chalk_ir::WhereClause<Interner>;
110110

111111
// FIXME: get rid of this
112112
pub fn subst_prefix(s: &Substitution, n: usize) -> Substitution {
113-
Substitution::intern(s.interned()[..std::cmp::min(s.len(&Interner), n)].into())
113+
Substitution::from_iter(
114+
&Interner,
115+
s.interned()[..std::cmp::min(s.len(&Interner), n)].iter().cloned(),
116+
)
114117
}
115118

116119
/// Return an index of a parameter in the generic type parameter list by it's id.

0 commit comments

Comments
 (0)