mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Substitution::prefix -> subst_prefix
I probably want to get rid of this function completely later.
This commit is contained in:
parent
2a83645e1b
commit
b67148daea
4 changed files with 15 additions and 11 deletions
|
@ -75,10 +75,9 @@ pub type ChalkTraitId = chalk_ir::TraitId<Interner>;
|
|||
|
||||
pub type FnSig = chalk_ir::FnSig<Interner>;
|
||||
|
||||
impl Substitution {
|
||||
pub fn prefix(&self, n: usize) -> Substitution {
|
||||
Substitution::intern(self.interned()[..std::cmp::min(self.len(&Interner), n)].into())
|
||||
}
|
||||
// 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())
|
||||
}
|
||||
|
||||
/// 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