From 407196b8c0f23e3ddc26e789b84542b1fd9b0eb8 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 28 Feb 2021 22:12:07 +0100 Subject: Lift FnPointer into a struct --- crates/hir_ty/src/traits/chalk.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty/src/traits/chalk.rs') diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs index c53e327da..3f5f5091f 100644 --- a/crates/hir_ty/src/traits/chalk.rs +++ b/crates/hir_ty/src/traits/chalk.rs @@ -19,7 +19,7 @@ use crate::{ display::HirDisplay, method_resolution::{TyFingerprint, ALL_FLOAT_FPS, ALL_INT_FPS}, utils::generics, - BoundVar, CallableDefId, DebruijnIndex, FnSig, GenericPredicate, ProjectionPredicate, + BoundVar, CallableDefId, CallableSig, DebruijnIndex, GenericPredicate, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, }; use mapping::{ @@ -286,9 +286,8 @@ impl<'a> chalk_solve::RustIrDatabase for ChalkContext<'a> { ) -> chalk_ir::Binders> { let sig_ty: Ty = from_chalk(self.db, substs.at(&Interner, 0).assert_ty_ref(&Interner).clone()); - let sig = FnSig::from_fn_ptr_substs( + let sig = CallableSig::from_substs( &sig_ty.substs().expect("first closure param should be fn ptr"), - false, ); let io = rust_ir::FnDefInputsAndOutputDatum { argument_types: sig.params().iter().map(|ty| ty.clone().to_chalk(self.db)).collect(), -- cgit v1.2.3