1 error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
2 --> $DIR/borrowck-report-with-custom-diagnostic.rs:8:13
5 | ------ mutable borrow occurs here
8 | ^^ immutable borrow occurs here
11 | ----------- mutable borrow later used here
13 error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
14 --> $DIR/borrowck-report-with-custom-diagnostic.rs:21:21
17 | -- immutable borrow occurs here
20 | ^^^^^^ mutable borrow occurs here
23 | ----------- immutable borrow later used here
25 error[E0499]: cannot borrow `x` as mutable more than once at a time
26 --> $DIR/borrowck-report-with-custom-diagnostic.rs:36:17
29 | ------ first mutable borrow occurs here
32 | ^^^^^^ second mutable borrow occurs here
35 | ----------- first borrow later used here
37 error: aborting due to 3 previous errors
39 Some errors have detailed explanations: E0499, E0502.
40 For more information about an error, try `rustc --explain E0499`.