mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Fix subst_prefix
This commit is contained in:
parent
5794a090bf
commit
dc0b581736
1 changed files with 4 additions and 1 deletions
|
@ -110,7 +110,10 @@ pub type WhereClause = chalk_ir::WhereClause<Interner>;
|
|||
|
||||
// FIXME: get rid of this
|
||||
pub fn subst_prefix(s: &Substitution, n: usize) -> Substitution {
|
||||
Substitution::intern(s.interned()[..std::cmp::min(s.len(&Interner), n)].into())
|
||||
Substitution::from_iter(
|
||||
&Interner,
|
||||
s.interned()[..std::cmp::min(s.len(&Interner), n)].iter().cloned(),
|
||||
)
|
||||
}
|
||||
|
||||
/// Return an index of a parameter in the generic type parameter list by it's id.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue