diff options
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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<Interner>; | |||
75 | 75 | ||
76 | pub type FnSig = chalk_ir::FnSig<Interner>; | 76 | pub type FnSig = chalk_ir::FnSig<Interner>; |
77 | 77 | ||
78 | impl Substitution { | 78 | // FIXME: get rid of this |
79 | pub fn prefix(&self, n: usize) -> Substitution { | 79 | pub fn subst_prefix(s: &Substitution, n: usize) -> Substitution { |
80 | Substitution::intern(self.interned()[..std::cmp::min(self.len(&Interner), n)].into()) | 80 | Substitution::intern(s.interned()[..std::cmp::min(s.len(&Interner), n)].into()) |
81 | } | ||
82 | } | 81 | } |
83 | 82 | ||
84 | /// Return an index of a parameter in the generic type parameter list by it's id. | 83 | /// Return an index of a parameter in the generic type parameter list by it's id. |