]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-20575.rs
Auto merge of #107137 - Mark-Simulacrum:169, r=Mark-Simulacrum
[rust.git] / tests / 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 }