]> git.lizzy.rs Git - rust.git/blob - src/test/ui/array-slice-vec/bounds-check-no-overflow.rs
Update tests to remove old numeric constants
[rust.git] / src / test / ui / array-slice-vec / bounds-check-no-overflow.rs
1 // run-fail
2 // error-pattern:index out of bounds
3 // ignore-emscripten no processes
4
5 use std::mem::size_of;
6
7 fn main() {
8     let xs = [1, 2, 3];
9     xs[usize::MAX / size_of::<isize>() + 1];
10 }