diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-05 21:25:13 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-05 21:25:13 +0100 |
commit | 7ce0e9c9ca552e063855d60df7dca65ba9953fc3 (patch) | |
tree | 054c1874844107ba3f5ae0e17736213a6cb974ce /crates/hir_ty/src/lower.rs | |
parent | f25c1e7c6a119a1035ba226f0735a0d6667a5db8 (diff) | |
parent | edc59d897d56815e8b9814cdc4ff084100e4f3b4 (diff) |
Merge #8358
8358: Align FnPointer with Chalk r=flodiebold a=flodiebold
CC #8313
Co-authored-by: Florian Diebold <[email protected]>
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 | } |