]> git.lizzy.rs Git - rust.git/blob - src/test/ui/functions-closures/closure_to_fn_coercion-expected-types.rs
Auto merge of #98203 - kckeiks:gather-body-owners-in-hir-item-queries, r=cjgillot
[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 }