Sign in
fuchsia
/
third_party
/
rust
/
9ae1a664f7b947dadb9e97eea7703831d9cd5d31
/
.
/
src
/
test
/
ui
/
unboxed-closures
/
unboxed-closures-infer-fnmut-missing-mut.rs
blob: 5c0ceb23d614cbb68d5e97cdeaf83d365bd953c2 [
file
] [
log
] [
blame
]
// 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
}