I learn Rust since two weeks. This does not compile:
let mut v = vec![1, 2, 3]; let first = &v[0]; v.push(4); println!("{}", first);
error[E0502]: cannot borrow v as mutable because it is also borrowed as immutable
I understand the message. I don't understand why is it a problem here, I am not changing element 0.