Sign in
android
/
toolchain
/
rustc
/
89a0a0cd9cbd0a0138a09bd877bbc73859a8c330
/
.
/
src
/
test
/
ui
/
array-slice-vec
/
dst-raw-slice.rs
blob: 371d16f093a7434fe8a002e371e23e44c9e63461 [
file
] [
log
] [
blame
]
// 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
];
}
}