Sign in
fuchsia
/
third_party
/
rust
/
7bade6ef730cff83f3591479a98916920f66decd
/
.
/
src
/
test
/
ui
/
consts
/
const-slice-oob.rs
blob: 70852f8f56929b140c963424b3d11ac827ff96a4 [
file
] [
log
] [
blame
]
#[
deny
(
const_err
)]
const
FOO
:
&
'
static
[
u32
]
=
&[
1
,
2
,
3
];
const
BAR
:
u32
=
FOO
[
5
];
//~^ index out of bounds: the length is 3 but the index is 5
//~| ERROR any use of this value will cause an error
fn
main
()
{
let
_
=
BAR
;
}