]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-lend-flow-if.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-lend-flow-if.stderr
1 error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immutable
2   --> $DIR/borrowck-lend-flow-if.rs:29:16
3    |
4 LL |         _w = &v;
5    |              -- immutable borrow occurs here
6 LL |     }
7 LL |     borrow_mut(&mut *v);
8    |                ^^^^^^^ mutable borrow occurs here
9 LL |     _w.use_ref();
10    |     ------------ immutable borrow later used here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0502`.