]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20575.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[rust.git] / src / test / ui / issues / issue-20575.rs
1 // run-pass
2 // Test that overloaded calls work with zero arity closures
3
4 // pretty-expanded FIXME #23616
5
6 fn main() {
7     let functions: [Box<dyn Fn() -> Option<()>>; 1] = [Box::new(|| None)];
8
9     let _: Option<Vec<()>> = functions.iter().map(|f| (*f)()).collect();
10 }