summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-20575.rs
blob: 0ca67d9dc710e6c421ad4428f762c2b9341ad537 (plain)
1
2
3
4
5
6
7
8
9
10
// run-pass
// Test that overloaded calls work with zero arity closures

// pretty-expanded FIXME #23616

fn main() {
    let functions: [Box<dyn Fn() -> Option<()>>; 1] = [Box::new(|| None)];

    let _: Option<Vec<()>> = functions.iter().map(|f| (*f)()).collect();
}