Sign in
android
/
toolchain
/
rustc
/
15a6560abe9880705f51d219c1fa94f880dbaf35
/
.
/
src
/
doc
/
book
/
listings
/
ch13-functional-features
/
no-listing-03-move-closures
/
src
/
main.rs
blob: 19d477608835c541bfb84faaf4e9f7b4df58623a [
file
] [
log
] [
blame
]
fn
main
()
{
let
x
=
vec
![
1
,
2
,
3
];
let
equal_to_x
=
move
|
z
|
z
==
x
;
println
!(
"can't use x here: {:?}"
,
x
);
let
y
=
vec
![
1
,
2
,
3
];
assert
!(
equal_to_x
(
y
));
}