Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
array-slice-vec
/
dst-raw-slice.rs
blob: ab9dedc139d7ee31fd8ee0e43428e4ba0c455771 [
file
] [
log
] [
blame
]
// Test bounds checking for DST raw slices
//@ run-fail
//@ error-pattern:index out of bounds
//@ needs-subprocess
#[
allow
(
unconditional_panic
)]
fn
main
()
{
let
a
:
*
const
[
_
]
=
&[
1
,
2
,
3
];
unsafe
{
let
_b
=
(*
a
)[
3
];
}
}