1 // Test that we are able to infer a suitable kind for this closure
2 // that is just called (`FnMut`).
3
main()4 fn main() {
5 let mut counter = 0;
6 let tick = || counter += 1;
7 tick(); //~ ERROR cannot borrow `tick` as mutable, as it is not declared as mutable
8 }
9