Sign in
fuchsia
/
third_party
/
rust
/
7de9402b77ded0d8ec9e1c554521b2121449ef2b
/
.
/
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
}