Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
issues
/
issue-6153.rs
blob: 25f026f214bf9b812dbbe29f66a5d0336f266e70 [
file
] [
log
] [
blame
]
// run-pass
fn
swap
<
F
>(
f
:
F
)
->
Vec
<
isize
>
where F
:
FnOnce
(
Vec
<
isize
>)
->
Vec
<
isize
>
{
let
x
=
vec
![
1
,
2
,
3
];
f
(
x
)
}
pub
fn
main
()
{
let
v
=
swap
(|
mut
x
|
{
x
.
push
(
4
);
x
});
let
w
=
swap
(|
mut
x
|
{
x
.
push
(
4
);
x
});
assert_eq
!(
v
,
w
);
}