]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/mir_indexing_oob_1.rs
Use better bound names in `-Zverbose` mode
[rust.git] / src / test / run-fail / mir_indexing_oob_1.rs
1 // error-pattern:index out of bounds: the len is 5 but the index is 10
2
3 const C: [u32; 5] = [0; 5];
4
5 #[allow(const_err)]
6 fn test() -> u32 {
7     C[10]
8 }
9
10 fn main() {
11     test();
12 }