2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-01-12 17:40:19 -06:00
|
|
|
// Test that overloaded calls work with zero arity closures
|
|
|
|
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-01-12 17:40:19 -06:00
|
|
|
fn main() {
|
2015-02-15 02:52:21 -06:00
|
|
|
let functions: [Box<Fn() -> Option<()>>; 1] = [Box::new(|| None)];
|
2015-01-12 17:40:19 -06:00
|
|
|
|
|
|
|
let _: Option<Vec<()>> = functions.iter().map(|f| (*f)()).collect();
|
|
|
|
}
|