diff options
author | Florian Diebold <[email protected]> | 2021-04-05 20:25:40 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 20:58:03 +0100 |
commit | 738174671ae40092684d7a9a543f939e318051e5 (patch) | |
tree | e1d4acc12a28b25b1b87f107d7f200d07f50d0d9 /crates/hir_ty/src/lib.rs | |
parent | 2f5a77658baafad1fe3551971ebbcdce87760847 (diff) |
Binders::wrap_empty -> wrap_empty_binders
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 12 |
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 | ||
95 | impl<T> Binders<T> { | 95 | pub fn wrap_empty_binders<T>(value: T) -> Binders<T> |
96 | pub fn wrap_empty(value: T) -> Self | 96 | where |
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 | ||
104 | impl<T: TypeWalk> Binders<T> { | 102 | impl<T: TypeWalk> Binders<T> { |