diff options
author | Florian Diebold <[email protected]> | 2021-04-05 21:23:16 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 21:23:30 +0100 |
commit | edc59d897d56815e8b9814cdc4ff084100e4f3b4 (patch) | |
tree | 054c1874844107ba3f5ae0e17736213a6cb974ce /crates/hir_ty/src/lower.rs | |
parent | f25c1e7c6a119a1035ba226f0735a0d6667a5db8 (diff) |
Align FnPointer with Chalk
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r-- | crates/hir_ty/src/lower.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 6cef8095f..20bb7dd59 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs | |||
@@ -34,9 +34,9 @@ use crate::{ | |||
34 | variant_data, Generics, | 34 | variant_data, Generics, |
35 | }, | 35 | }, |
36 | AliasEq, AliasTy, Binders, BoundVar, CallableSig, DebruijnIndex, DynTy, FnPointer, FnSig, | 36 | AliasEq, AliasTy, Binders, BoundVar, CallableSig, DebruijnIndex, DynTy, FnPointer, FnSig, |
37 | ImplTraitId, OpaqueTy, PolyFnSig, ProjectionTy, QuantifiedWhereClause, QuantifiedWhereClauses, | 37 | FnSubst, ImplTraitId, OpaqueTy, PolyFnSig, ProjectionTy, QuantifiedWhereClause, |
38 | ReturnTypeImplTrait, ReturnTypeImplTraits, Substitution, TraitEnvironment, TraitRef, Ty, | 38 | QuantifiedWhereClauses, ReturnTypeImplTrait, ReturnTypeImplTraits, Substitution, |
39 | TyBuilder, TyKind, TypeWalk, WhereClause, | 39 | TraitEnvironment, TraitRef, Ty, TyBuilder, TyKind, TypeWalk, WhereClause, |
40 | }; | 40 | }; |
41 | 41 | ||
42 | #[derive(Debug)] | 42 | #[derive(Debug)] |
@@ -181,9 +181,9 @@ impl<'a> TyLoweringContext<'a> { | |||
181 | let substs = | 181 | let substs = |
182 | Substitution::from_iter(&Interner, params.iter().map(|tr| self.lower_ty(tr))); | 182 | Substitution::from_iter(&Interner, params.iter().map(|tr| self.lower_ty(tr))); |
183 | TyKind::Function(FnPointer { | 183 | TyKind::Function(FnPointer { |
184 | num_args: substs.len(&Interner) - 1, | 184 | num_binders: 0, // FIXME lower `for<'a> fn()` correctly |
185 | sig: FnSig { abi: (), safety: Safety::Safe, variadic: *is_varargs }, | 185 | sig: FnSig { abi: (), safety: Safety::Safe, variadic: *is_varargs }, |
186 | substs, | 186 | substitution: FnSubst(substs), |
187 | }) | 187 | }) |
188 | .intern(&Interner) | 188 | .intern(&Interner) |
189 | } | 189 | } |