2018-04-10 17:38:35 -05:00
|
|
|
error[E0499]: cannot borrow `*arg` as mutable more than once at a time
|
|
|
|
--> $DIR/mut-borrow-in-loop.rs:20:25
|
|
|
|
|
|
|
|
|
LL | (self.func)(arg) //~ ERROR cannot borrow
|
2018-07-23 14:03:08 -05:00
|
|
|
| ^^^ mutable borrow starts here in previous iteration of loop
|
|
|
|
|
|
2018-09-29 05:47:47 -05:00
|
|
|
note: first borrowed value must be valid for the lifetime 'a as defined on the impl at 17:6...
|
2018-07-23 14:03:08 -05:00
|
|
|
--> $DIR/mut-borrow-in-loop.rs:17:6
|
|
|
|
|
|
|
|
|
LL | impl<'a, T : 'a> FuncWrapper<'a, T> {
|
|
|
|
| ^^
|
2018-04-10 17:38:35 -05:00
|
|
|
|
|
|
|
error[E0499]: cannot borrow `*arg` as mutable more than once at a time
|
|
|
|
--> $DIR/mut-borrow-in-loop.rs:26:25
|
|
|
|
|
|
|
|
|
LL | (self.func)(arg) //~ ERROR cannot borrow
|
2018-07-23 14:03:08 -05:00
|
|
|
| ^^^ mutable borrow starts here in previous iteration of loop
|
|
|
|
|
|
2018-09-29 05:47:47 -05:00
|
|
|
note: first borrowed value must be valid for the lifetime 'a as defined on the impl at 17:6...
|
2018-07-23 14:03:08 -05:00
|
|
|
--> $DIR/mut-borrow-in-loop.rs:17:6
|
|
|
|
|
|
|
|
|
LL | impl<'a, T : 'a> FuncWrapper<'a, T> {
|
|
|
|
| ^^
|
2018-04-10 17:38:35 -05:00
|
|
|
|
|
|
|
error[E0499]: cannot borrow `*arg` as mutable more than once at a time
|
|
|
|
--> $DIR/mut-borrow-in-loop.rs:33:25
|
|
|
|
|
|
|
|
|
LL | (self.func)(arg) //~ ERROR cannot borrow
|
2018-07-23 14:03:08 -05:00
|
|
|
| ^^^ mutable borrow starts here in previous iteration of loop
|
|
|
|
|
|
2018-09-29 05:47:47 -05:00
|
|
|
note: first borrowed value must be valid for the lifetime 'a as defined on the impl at 17:6...
|
2018-07-23 14:03:08 -05:00
|
|
|
--> $DIR/mut-borrow-in-loop.rs:17:6
|
|
|
|
|
|
|
|
|
LL | impl<'a, T : 'a> FuncWrapper<'a, T> {
|
|
|
|
| ^^
|
2018-04-10 17:38:35 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0499`.
|