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
+1
View File
@@ -126,6 +126,7 @@ fn deduce_expectations_from_expected_type
(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),
}
}