about summary refs log tree commit diff
path: root/tests/ui/issues/issue-20575.rs
blob: b213b79d37cab1902c05bf0272387ba5eab6a64f (plain)
1
2
3
4
5
6
7
8
9
//@ run-pass
// Test that overloaded calls work with zero arity closures


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

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