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