diff options
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index 928dd76e5..6d5123cf1 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs | |||
@@ -31,7 +31,6 @@ mod test_db; | |||
31 | use std::sync::Arc; | 31 | use std::sync::Arc; |
32 | 32 | ||
33 | use itertools::Itertools; | 33 | use itertools::Itertools; |
34 | use smallvec::SmallVec; | ||
35 | 34 | ||
36 | use base_db::salsa; | 35 | use base_db::salsa; |
37 | use hir_def::{ | 36 | use hir_def::{ |
@@ -77,14 +76,6 @@ pub type ChalkTraitId = chalk_ir::TraitId<Interner>; | |||
77 | pub type FnSig = chalk_ir::FnSig<Interner>; | 76 | pub type FnSig = chalk_ir::FnSig<Interner>; |
78 | 77 | ||
79 | impl Substitution { | 78 | impl Substitution { |
80 | pub fn single(ty: Ty) -> Substitution { | ||
81 | Substitution::intern({ | ||
82 | let mut v = SmallVec::new(); | ||
83 | v.push(ty.cast(&Interner)); | ||
84 | v | ||
85 | }) | ||
86 | } | ||
87 | |||
88 | pub fn prefix(&self, n: usize) -> Substitution { | 79 | pub fn prefix(&self, n: usize) -> Substitution { |
89 | Substitution::intern(self.interned()[..std::cmp::min(self.len(&Interner), n)].into()) | 80 | Substitution::intern(self.interned()[..std::cmp::min(self.len(&Interner), n)].into()) |
90 | } | 81 | } |