]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0502]: cannot borrow `*a` as mutable because it is also borrowed as immutable |
2 | --> $DIR/E0502.rs:4:5 | |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | let ref y = a; |
2c00a5a8 | 5 | | ----- immutable borrow occurs here |
532ac7d7 | 6 | LL | bar(a); |
48663c56 | 7 | | ^^^^^^ mutable borrow occurs here |
94b46f34 | 8 | LL | y.use_ref(); |
add651ee | 9 | | - immutable borrow later used here |
2c00a5a8 | 10 | |
4b012472 | 11 | error: aborting due to 1 previous error |
2c00a5a8 | 12 | |
0531ce1d | 13 | For more information about this error, try `rustc --explain E0502`. |