about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyo Yoshida <low.ryoshida@gmail.com>2022-10-26 16:41:11 +0900
committerRyo Yoshida <low.ryoshida@gmail.com>2022-10-27 19:18:51 +0900
commit1fe10bff1dc1368ae6a841cad6d36922cb270ec2 (patch)
tree941f0304fba08a29a8ac3e211760be6ba0253b5b
parent0340b51ff710daf8e8b8895e8fc1a12c95e8886f (diff)
downloadrust-1fe10bff1dc1368ae6a841cad6d36922cb270ec2.tar.gz
rust-1fe10bff1dc1368ae6a841cad6d36922cb270ec2.zip
refactor: remove obsolete code
-rw-r--r--crates/hir-ty/src/lib.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs
index c4b700cbce6..8458a4fe1cd 100644
--- a/crates/hir-ty/src/lib.rs
+++ b/crates/hir-ty/src/lib.rs
@@ -124,14 +124,6 @@ pub type ConstrainedSubst = chalk_ir::ConstrainedSubst<Interner>;
 pub type Guidance = chalk_solve::Guidance<Interner>;
 pub type WhereClause = chalk_ir::WhereClause<Interner>;
 
-// FIXME: get rid of this
-pub fn subst_prefix(s: &Substitution, n: usize) -> Substitution {
-    Substitution::from_iter(
-        Interner,
-        s.as_slice(Interner)[..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.
 pub fn param_idx(db: &dyn HirDatabase, id: TypeOrConstParamId) -> Option<usize> {
     generics(db.upcast(), id.parent).param_idx(id)
@@ -382,7 +374,6 @@ pub(crate) fn fold_tys_and_consts<T: HasInterner<Interner = Interner> + TypeFold
 pub fn replace_errors_with_variables<T>(t: &T) -> Canonical<T>
 where
     T: HasInterner<Interner = Interner> + TypeFoldable<Interner> + Clone,
-    T: HasInterner<Interner = Interner>,
 {
     use chalk_ir::{
         fold::{FallibleTypeFolder, TypeSuperFoldable},