]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[rust.git] / src / test / ui / borrowck / mut-borrow-of-mut-ref.stderr
1 error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
2   --> $DIR/mut-borrow-of-mut-ref.rs:5:7
3    |
4 LL |     g(&mut b);
5    |       ^^^^^^
6    |       |
7    |       cannot borrow as mutable
8    |       try removing `&mut` here
9
10 error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
11   --> $DIR/mut-borrow-of-mut-ref.rs:7:12
12    |
13 LL |     g(&mut &mut b);
14    |            ^^^^^^
15    |            |
16    |            cannot borrow as mutable
17    |            try removing `&mut` here
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0596`.