diff options
author | Florian Diebold <[email protected]> | 2021-04-07 20:26:24 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-08 13:08:55 +0100 |
commit | b25b147e8604f62a5620a5833112e358ebeeb287 (patch) | |
tree | 9f5d3249d633c12e4908bc7cbcd0ba4f1c6ac833 /crates/hir_ty/src/lib.rs | |
parent | dc0b5817366f9b7b99a1a1f6e69ca7ac63e9ed0f (diff) |
Fix shifted_{in,out} calls
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index 78ae3545a..7d4793c2f 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs | |||
@@ -35,7 +35,7 @@ use std::sync::Arc; | |||
35 | use base_db::salsa; | 35 | use base_db::salsa; |
36 | use chalk_ir::{ | 36 | use chalk_ir::{ |
37 | cast::{CastTo, Caster}, | 37 | cast::{CastTo, Caster}, |
38 | fold::Fold, | 38 | fold::{Fold, Shift}, |
39 | interner::HasInterner, | 39 | interner::HasInterner, |
40 | UintTy, | 40 | UintTy, |
41 | }; | 41 | }; |
@@ -123,9 +123,9 @@ pub fn param_idx(db: &dyn HirDatabase, id: TypeParamId) -> Option<usize> { | |||
123 | 123 | ||
124 | pub fn wrap_empty_binders<T>(value: T) -> Binders<T> | 124 | pub fn wrap_empty_binders<T>(value: T) -> Binders<T> |
125 | where | 125 | where |
126 | T: TypeWalk + HasInterner<Interner = Interner>, | 126 | T: Fold<Interner, Result = T> + HasInterner<Interner = Interner>, |
127 | { | 127 | { |
128 | Binders::empty(&Interner, value.shifted_in_from(DebruijnIndex::ONE)) | 128 | Binders::empty(&Interner, value.shifted_in_from(&Interner, DebruijnIndex::ONE)) |
129 | } | 129 | } |
130 | 130 | ||
131 | pub fn make_only_type_binders<T: HasInterner<Interner = Interner>>( | 131 | pub fn make_only_type_binders<T: HasInterner<Interner = Interner>>( |
@@ -187,7 +187,7 @@ impl CallableSig { | |||
187 | params_and_return: fn_ptr | 187 | params_and_return: fn_ptr |
188 | .substitution | 188 | .substitution |
189 | .clone() | 189 | .clone() |
190 | .shifted_out_to(DebruijnIndex::ONE) | 190 | .shifted_out_to(&Interner, DebruijnIndex::ONE) |
191 | .expect("unexpected lifetime vars in fn ptr") | 191 | .expect("unexpected lifetime vars in fn ptr") |
192 | .0 | 192 | .0 |
193 | .interned() | 193 | .interned() |