]> git.lizzy.rs Git - rust.git/blob - src/test/ui/functions-closures/closure_to_fn_coercion-expected-types.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[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 }