From b67148daea86d85d211c4243f22635d6ac7e1983 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Mon, 5 Apr 2021 21:56:40 +0200 Subject: Substitution::prefix -> subst_prefix I probably want to get rid of this function completely later. --- crates/hir_ty/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/hir_ty/src/lib.rs') diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index abdcf8829..f74b22b58 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs @@ -75,10 +75,9 @@ pub type ChalkTraitId = chalk_ir::TraitId; pub type FnSig = chalk_ir::FnSig; -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. -- cgit v1.2.3