aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r--crates/hir_ty/src/lower.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs
index 20bb7dd59..3cbb6ad54 100644
--- a/crates/hir_ty/src/lower.rs
+++ b/crates/hir_ty/src/lower.rs
@@ -178,8 +178,9 @@ impl<'a> TyLoweringContext<'a> {
178 } 178 }
179 TypeRef::Placeholder => TyKind::Error.intern(&Interner), 179 TypeRef::Placeholder => TyKind::Error.intern(&Interner),
180 TypeRef::Fn(params, is_varargs) => { 180 TypeRef::Fn(params, is_varargs) => {
181 let substs = 181 let substs = self.with_shifted_in(DebruijnIndex::ONE, |ctx| {
182 Substitution::from_iter(&Interner, params.iter().map(|tr| self.lower_ty(tr))); 182 Substitution::from_iter(&Interner, params.iter().map(|tr| ctx.lower_ty(tr)))
183 });
183 TyKind::Function(FnPointer { 184 TyKind::Function(FnPointer {
184 num_binders: 0, // FIXME lower `for<'a> fn()` correctly 185 num_binders: 0, // FIXME lower `for<'a> fn()` correctly
185 sig: FnSig { abi: (), safety: Safety::Safe, variadic: *is_varargs }, 186 sig: FnSig { abi: (), safety: Safety::Safe, variadic: *is_varargs },