]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/two-phase-sneaky.stderr
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / borrowck / two-phase-sneaky.stderr
1 error[E0499]: cannot borrow `v` as mutable more than once at a time
2   --> $DIR/two-phase-sneaky.rs:10:9
3    |
4 LL |     v[0].push_str({
5    |     -    -------- first borrow later used by call
6    |     |
7    |     first mutable borrow occurs here
8 LL |
9 LL |         v.push(format!("foo"));
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`.