]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/bounds-check-no-overflow.rs
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / 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 }