prog.rs:10:5: 10:8 error: cannot borrow `vec` as mutable because it is also borrowed as immutable
prog.rs:10 vec.push(4);
^~~
prog.rs:6:16: 6:19 note: previous borrow of `vec` occurs here; the immutable borrow prevents subsequent moves or mutable borrows of `vec` until the borrow ends
prog.rs:6 let ptr = &vec[0];
^~~
prog.rs:13:2: 13:2 note: previous borrow ends here
prog.rs:1 fn main() {
...
prog.rs:13 }
^
error: aborting due to previous error