rust/tests/ui/closures/issue-48109.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
186 B
Rust
Raw Normal View History

// check-pass
fn useful(i: usize) -> usize {
i
}
fn useful2(i: usize) -> usize {
i
}
fn main() {
for f in &[useful, useful2, |x| x] {
println!("{}", f(6));
}
}