error[E0502]: cannot borrow `val` as mutable because it is also borrowed as immutable --> $DIR/invalid_borrow.rs:8:13 | 7 | let borrow = val.borrow::(); | ------------------- immutable borrow occurs here 8 | let _ = val.borrow_mut::(); | ^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here 9 | 10 | println!("Borrowed over mutable: {}", borrow); | ------ immutable borrow later used here