Sign in
fuchsia
/
third_party
/
rust
/
2ecc48ffa17d55ec02f3beb5bb17c718cb439202
/
.
/
src
/
test
/
ui
/
binding
/
zero_sized_subslice_match.rs
blob: 187c2983633e7dcb3a18e34bfa56102393ccfd0f [
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
())
}
}