error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable --> test.rs:4:9 | 3 | let y = &x; | -- immutable borrow occurs here 4 | let z = &mut x; | ^^^^^^ mutable borrow occurs here ... 7 | dbg!(y); | - immutable borrow later used here