]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.stderr
Unit test from #57866.
[rust.git] / src / test / ui / borrowck / borrowck-vec-pattern-loan-from-mut.nll.stderr
1 error[E0499]: cannot borrow `v` as mutable more than once at a time
2   --> $DIR/borrowck-vec-pattern-loan-from-mut.rs:8:13
3    |
4 LL |     let vb: &mut [isize] = &mut v;
5    |                            ------ first mutable borrow occurs here
6 ...
7 LL |             v.push(tail[0] + tail[1]); //~ ERROR cannot borrow
8    |             ^      ------- first borrow later used here
9    |             |
10    |             second mutable borrow occurs here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0499`.