blob: 3fbb747db24f14053f5cb7d4d40b0e1cb4fe63c9 [file] [log] [blame]
error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
--> $DIR/borrowck-unboxed-closures.rs:17:5
|
LL | fn b<F:FnMut(isize, isize) -> isize>(f: F) {
| - help: consider changing this to be mutable: `mut f`
LL | f(1, 2); //~ ERROR cannot borrow immutable argument
| ^ cannot borrow as mutable
error[E0382]: use of moved value: `f`
--> $DIR/borrowck-unboxed-closures.rs:22:5
|
LL | f(1, 2);
| - value moved here
LL | f(1, 2); //~ ERROR use of moved value
| ^ value used here after move
|
= note: move occurs because `f` has type `F`, which does not implement the `Copy` trait
error: aborting due to 2 previous errors
Some errors occurred: E0382, E0596.
For more information about an error, try `rustc --explain E0382`.