]> git.lizzy.rs Git - rust.git/blob - src/test/ui/functions-closures/closure_to_fn_coercion-expected-types.rs
Rollup merge of #97963 - devnexen:net_listener_neg, r=the8472
[rust.git] / src / test / ui / functions-closures / closure_to_fn_coercion-expected-types.rs
1 // run-pass
2 #![allow(unused_variables)]
3 // Ensure that we deduce expected argument types when a `fn()` type is expected (#41755)
4
5 fn foo(f: fn(Vec<u32>) -> usize) { }
6
7 fn main() {
8     foo(|x| x.len())
9 }