Closed
Description
Type inference for the expected type of arguments doesn't work when coercing from a closure expression. For example, this code does not compile https://is.gd/FNoLWg (at least, not without an explicit x: Vec<u32>
annotation):
#![feature(closure_to_fn_coercion)]
fn foo(f: fn(Vec<u32>) -> usize) { }
fn main() {
foo(|x| x.len())
}