]> git.lizzy.rs Git - rust.git/blob - tests/ui/reassign-ref-mut.stderr
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
[rust.git] / tests / ui / reassign-ref-mut.stderr
1 error[E0384]: cannot assign twice to immutable variable `a`
2   --> $DIR/reassign-ref-mut.rs:12:5
3    |
4 LL |     let &mut (ref a, ref mut b) = &mut one_two;
5    |               ----- first assignment to `a`
6 LL |     a = &three_four.0;
7    |     ^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
8
9 error[E0384]: cannot assign twice to immutable variable `b`
10   --> $DIR/reassign-ref-mut.rs:14:5
11    |
12 LL |     let &mut (ref a, ref mut b) = &mut one_two;
13    |                      --------- first assignment to `b`
14 ...
15 LL |     b = &mut three_four.1;
16    |     ^^^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0384`.