Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
array-slice-vec
/
dst-raw-slice.rs
blob: f1281f4e302f2ada0723ee93f36c801a972ca039 [
file
] [
log
] [
blame
] [
edit
]
// Test bounds checking for DST raw slices
//@ run-fail
//@ error-pattern:index out of bounds
//@ ignore-emscripten no processes
#[
allow
(
unconditional_panic
)]
fn
main
()
{
let
a
:
*
const
[
_
]
=
&[
1
,
2
,
3
];
unsafe
{
let
_b
=
(*
a
)[
3
];
}
}