rust has buffer overflow checking

I was not sure what happens when I try to make an out-of-bounds access on an array in rust. So I tried.

fn main () {
  let k = [1, 2, 3];
  k[4];
}

When I compiled the code, it did not complain. However, when I executed the result, I saw

task '<unnamed>' failed at 'index out of bounds: the len is 3 but the index is 4', overflow.rs:3

Not only the runtime refused to run the out-of-bound access, it produced a readable and informative message. I decided to investigate this language further.