1 error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immutable
2 --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:11:18
4 LL | let p: &isize = &*t0; // Freezes `*t0`
5 | ---- immutable borrow occurs here
6 LL | let mut t2 = &mut t0;
7 | ^^^^^^^ mutable borrow occurs here
8 LL | **t2 += 1; // Mutates `*t0`
10 | ----------- immutable borrow later used here
12 error[E0499]: cannot borrow `t0` as mutable more than once at a time
13 --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:19:18
15 LL | let p: &mut isize = &mut *t0; // Claims `*t0`
16 | -------- first mutable borrow occurs here
17 LL | let mut t2 = &mut t0;
18 | ^^^^^^^ second mutable borrow occurs here
19 LL | **t2 += 1; // Mutates `*t0` but not through `*p`
21 | ----------- first borrow later used here
23 error: aborting due to 2 previous errors
25 Some errors have detailed explanations: E0499, E0502.
26 For more information about an error, try `rustc --explain E0499`.