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