diff options
Diffstat (limited to 'tests/ui/issues/issue-29798.rs')
-rw-r--r-- | tests/ui/issues/issue-29798.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-29798.rs b/tests/ui/issues/issue-29798.rs new file mode 100644 index 000000000..5eff5d191 --- /dev/null +++ b/tests/ui/issues/issue-29798.rs @@ -0,0 +1,11 @@ +// run-fail +// error-pattern:index out of bounds: the len is 5 but the index is 5 +// ignore-emscripten no processes + +const fn test(x: usize) -> i32 { + [42;5][x] +} + +fn main () { + let _ = test(5); +} |