2024-02-16 20:02:50 +00:00
|
|
|
//@ run-fail
|
|
|
|
|
//@ error-pattern:index out of bounds: the len is 5 but the index is 5
|
2025-01-23 16:36:54 +08:00
|
|
|
//@ needs-subprocess
|
2017-07-25 11:31:59 +09:00
|
|
|
|
|
|
|
|
const fn test(x: usize) -> i32 {
|
|
|
|
|
[42;5][x]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main () {
|
|
|
|
|
let _ = test(5);
|
|
|
|
|
}
|