]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / unboxed-closures / unboxed-closures-infer-fnmut-move-missing-mut.rs
1 // Test that we are able to infer a suitable kind for this closure
2 // that is just called (`FnMut`).
3
4 fn main() {
5     let mut counter = 0;
6     let tick = move || counter += 1;
7     tick(); //~ ERROR cannot borrow immutable local variable `tick` as mutable
8 }