Sign in
rust
/
rust-lang
/
rust
/
refs/heads/beta
/
.
/
tests
/
ui
/
array-slice-vec
/
bounds-check-no-overflow.rs
blob: c5ff805a853e0c943fcc1e8e0a36bb335cbd4c0a [
file
] [
log
] [
blame
]
//@ run-fail
//@ error-pattern:index out of bounds
//@ needs-subprocess
use
std
::
mem
::
size_of
;
fn
main
()
{
let
xs
=
[
1
,
2
,
3
];
xs
[
usize
::
MAX
/
size_of
::<
isize
>()
+
1
];
}