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