mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
inferring expected types of closure arguments when coercing to a fn
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user