Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
mir
/
mir_indexing_oob_2.rs
blob: 310a7f8f2b75fefad9eb5d420c7111c131ec1596 [
file
] [
log
] [
blame
]
//@ run-fail
//@ error-pattern:index out of bounds: the len is 5 but the index is 10
//@ needs-subprocess
const
C
:
&
'
static
[
u8
;
5
]
=
b
"hello"
;
#[
allow
(
unconditional_panic
)]
fn
test
()
->
u8
{
C
[
10
]
}
fn
main
()
{
test
();
}