1 // run-pass 2 // Test that we are able to infer a suitable kind for this closure 3 // that is just called (`FnMut`). 4 main()5 fn main() { 6 let mut counter = 0; 7 8 { 9 let mut tick = || counter += 1; 10 tick(); 11 tick(); 12 } 13 14 assert_eq!(counter, 2); 15 } 16