Sign in
fuchsia
/
third_party
/
rust
/
7de9402b77ded0d8ec9e1c554521b2121449ef2b
/
.
/
src
/
test
/
ui
/
binding
/
irrefutable-slice-patterns.rs
blob: ac733ef6e9c862c7b96628fefb8ad34ecc26072c [
file
] [
log
] [
blame
]
// run-pass
// #47096
#![
feature
(
slice_patterns
)]
fn
foo
(
s
:
&[
i32
])
->
&[
i32
]
{
let
&[
ref
xs
@
..]
=
s
;
xs
}
fn
main
()
{
let
x
=
[
1
,
2
,
3
];
let
y
=
foo
(&
x
);
assert_eq
!(
x
,
y
);
}