Sign in
rust
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
match
/
match-tuple-slice.rs
blob: aaebf4401d09996b7ded66ac0701a4d693e5a8ca [
file
] [
log
] [
blame
] [
edit
]
//! regression test for <https://github.com/rust-lang/rust/issues/16648>
//@ run-pass
fn
main
()
{
let
x
:
(
isize
,
&[
isize
])
=
(
2
,
&[
1
,
2
]);
assert_eq
!(
match
x
{
(
0
,
&[
_
,
_
])
=>
0
,
(
1
,
_
)
=>
1
,
(
2
,
&[
_
,
_
])
=>
2
,
(
2
,
_
)
=>
3
,
_
=>
4
},
2
);
}