aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-05 20:25:40 +0100
committerFlorian Diebold <[email protected]>2021-04-05 20:58:03 +0100
commit738174671ae40092684d7a9a543f939e318051e5 (patch)
treee1d4acc12a28b25b1b87f107d7f200d07f50d0d9 /crates/hir_ty/src/lib.rs
parent2f5a77658baafad1fe3551971ebbcdce87760847 (diff)
Binders::wrap_empty -> wrap_empty_binders
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r--crates/hir_ty/src/lib.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs
index 6d5123cf1..61f5adbc4 100644
--- a/crates/hir_ty/src/lib.rs
+++ b/crates/hir_ty/src/lib.rs
@@ -92,13 +92,11 @@ pub fn param_idx(db: &dyn HirDatabase, id: TypeParamId) -> Option<usize> {
92 generics(db.upcast(), id.parent).param_idx(id) 92 generics(db.upcast(), id.parent).param_idx(id)
93} 93}
94 94
95impl<T> Binders<T> { 95pub fn wrap_empty_binders<T>(value: T) -> Binders<T>
96 pub fn wrap_empty(value: T) -> Self 96where
97 where 97 T: TypeWalk,
98 T: TypeWalk, 98{
99 { 99 Binders::empty(&Interner, value.shifted_in_from(DebruijnIndex::ONE))
100 Binders::empty(&Interner, value.shifted_in_from(DebruijnIndex::ONE))
101 }
102} 100}
103 101
104impl<T: TypeWalk> Binders<T> { 102impl<T: TypeWalk> Binders<T> {