]> git.lizzy.rs Git - rust.git/blob - tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs
Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett
[rust.git] / tests / ui / unboxed-closures / unboxed-closures-infer-fnmut.rs
1 // run-pass
2 // Test that we are able to infer a suitable kind for this closure
3 // that is just called (`FnMut`).
4
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 }