diff options
author | Florian Diebold <[email protected]> | 2021-04-05 20:56:40 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 20:58:53 +0100 |
commit | b67148daea86d85d211c4243f22635d6ac7e1983 (patch) | |
tree | 0f666c5b917de8a0f2ebf5fba185500d153036f3 /crates/hir_ty/src/lib.rs | |
parent | 2a83645e1bb01578c4bbe5f71418d354108dfd77 (diff) |
Substitution::prefix -> subst_prefix
I probably want to get rid of this function completely later.
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. |