inferring expected types of closure arguments when coercing to a fn

This commit is contained in:
Christian Poveda 2017-05-08 14:56:33 -05:00
parent 59f1a2f948
commit f096c8d174

View File

@ -126,6 +126,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
(sig, kind)
}
ty::TyInfer(ty::TyVar(vid)) => self.deduce_expectations_from_obligations(vid),
ty::TyFnPtr(sig) => (Some(sig.skip_binder().clone()), Some(ty::ClosureKind::Fn)),
_ => (None, None),
}
}