]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/bounds-check-no-overflow.rs
Auto merge of #68506 - tmandry:rollup-kz9d33v, r=tmandry
[rust.git] / src / test / run-fail / bounds-check-no-overflow.rs
1 // error-pattern:index out of bounds
2
3 use std::usize;
4 use std::mem::size_of;
5
6 fn main() {
7     let xs = [1, 2, 3];
8     xs[usize::MAX / size_of::<isize>() + 1];
9 }