]> git.lizzy.rs Git - rust.git/blob - src/test/ui/codemap_tests/one_line.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / codemap_tests / one_line.stderr
1 error[E0499]: cannot borrow `v` as mutable more than once at a time
2   --> $DIR/one_line.rs:3:12
3    |
4 LL |     v.push(v.pop().unwrap());
5    |     -------^^^^^^^----------
6    |     | |    |
7    |     | |    second mutable borrow occurs here
8    |     | first borrow later used by call
9    |     first mutable borrow occurs here
10    |
11 help: try adding a local storing this argument...
12   --> $DIR/one_line.rs:3:12
13    |
14 LL |     v.push(v.pop().unwrap());
15    |            ^^^^^^^
16 help: ...and then using that local as the argument to this call
17   --> $DIR/one_line.rs:3:5
18    |
19 LL |     v.push(v.pop().unwrap());
20    |     ^^^^^^^^^^^^^^^^^^^^^^^^
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0499`.