]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/mut-borrow-outside-loop.stderr
Rollup merge of #106798 - scottmcm:signum-via-cmp, r=Mark-Simulacrum
[rust.git] / tests / ui / borrowck / mut-borrow-outside-loop.stderr
1 error[E0499]: cannot borrow `void` as mutable more than once at a time
2   --> $DIR/mut-borrow-outside-loop.rs:7:18
3    |
4 LL |     let first = &mut void;
5    |                 --------- first mutable borrow occurs here
6 LL |     let second = &mut void;
7    |                  ^^^^^^^^^ second mutable borrow occurs here
8 LL |     first.use_mut();
9    |     --------------- first borrow later used here
10
11 error[E0499]: cannot borrow `inner_void` as mutable more than once at a time
12   --> $DIR/mut-borrow-outside-loop.rs:15:28
13    |
14 LL |         let inner_first = &mut inner_void;
15    |                           --------------- first mutable borrow occurs here
16 LL |         let inner_second = &mut inner_void;
17    |                            ^^^^^^^^^^^^^^^ second mutable borrow occurs here
18 LL |         inner_second.use_mut();
19 LL |         inner_first.use_mut();
20    |         --------------------- first borrow later used here
21
22 error: aborting due to 2 previous errors
23
24 For more information about this error, try `rustc --explain E0499`.