mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
11 lines
271 B
Rust
11 lines
271 B
Rust
//@ 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();
|
|
}
|