]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-29798.rs
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-29798.rs
1 // run-fail
2 // error-pattern:index out of bounds: the len is 5 but the index is 5
3 // ignore-emscripten no processes
4
5 const fn test(x: usize) -> i32 {
6     [42;5][x]
7 }
8
9 fn main () {
10     let _ = test(5);
11 }