Both the non-commented and commented code result in the same sum value. I'm not sure what's happening here, but I'm expecting the compiler to throw an error on NOT using a dereference.
fn main() {
let a = vec![0, 1, 2, 3, 4];
let mut sum = 0;
for x in &a {
sum += *x;
// sum += x;
}
}