blob: e57c64ae12730394a36d5a5557e18eacdb1f2b0c [file] [log] [blame]
error[E0499]: cannot borrow `*arg` as mutable more than once at a time
--> $DIR/mut-borrow-in-loop.rs:20:25
|
LL | impl<'a, T : 'a> FuncWrapper<'a, T> {
| -- lifetime `'a` defined here
...
LL | (self.func)(arg) //~ ERROR cannot borrow
| ------------^^^-
| | |
| | mutable borrow starts here in previous iteration of loop
| argument requires that `*arg` is borrowed for `'a`
error[E0499]: cannot borrow `*arg` as mutable more than once at a time
--> $DIR/mut-borrow-in-loop.rs:26:25
|
LL | impl<'a, T : 'a> FuncWrapper<'a, T> {
| -- lifetime `'a` defined here
...
LL | (self.func)(arg) //~ ERROR cannot borrow
| ------------^^^-
| | |
| | mutable borrow starts here in previous iteration of loop
| argument requires that `*arg` is borrowed for `'a`
error[E0499]: cannot borrow `*arg` as mutable more than once at a time
--> $DIR/mut-borrow-in-loop.rs:33:25
|
LL | impl<'a, T : 'a> FuncWrapper<'a, T> {
| -- lifetime `'a` defined here
...
LL | (self.func)(arg) //~ ERROR cannot borrow
| ------------^^^-
| | |
| | mutable borrow starts here in previous iteration of loop
| argument requires that `*arg` is borrowed for `'a`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0499`.