Sign in
rust
/
rust
/
HEAD
/
.
/
tests
/
ui
/
binding
/
zero_sized_subslice_match.rs
blob: 6da9f9593b44f553dd6e2f12f1519f25917c5501 [
file
] [
log
] [
blame
]
//@ run-pass
fn
main
()
{
let
x
=
[(),
()];
// The subslice used to go out of bounds for zero-sized array items, check that this doesn't
// happen anymore
match
x
{
[
_
,
ref
y
@
..]
=>
assert_eq
!(&
x
[
1
]
as
*
const
(),
&
y
[
0
]
as
*
const
())
}
}