After reading this bit:
// Vec is our growable heap-allocated array type.
// This is just a handy way to make one with some fixed data.
let mut v = vec![1i32, 2, 3, 4, 5];
let x = v.get(2);
v.push(6); // oops, sorry x!
I really hope that the Rust compiler has some really good error messages explaining what the problem is because I couldn't see what was wrong with this fragment until I read the explanation.Saying that, after reading the explanation it became a bit more obvious, and I really like the way of describing the relationship to the pointer as a 'view' and 'loan', which as a c++ programmer (though clearly spending too much time with GC languages) I can understand.