inferring expected types of closure arguments when coercing to a fn
This commit is contained in:
parent
59f1a2f948
commit
f096c8d174
@ -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),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user