Sign in
fuchsia
/
third_party
/
rust
/
15f159addefd8fea7564ba7617c8af78582b7816
/
.
/
src
/
test
/
ui
/
suggestions
/
borrow-for-loop-head.rs
blob: c2bda55e58903ea6c91ec5adc0201e256b600e62 [
file
] [
log
] [
blame
]
fn
main
()
{
let
a
=
vec
![
1
,
2
,
3
];
for
i in
&
a
{
for
j in a
{
//~^ ERROR cannot move out of `a` because it is borrowed
//~| ERROR use of moved value: `a`
println
!(
"{} * {} = {}"
,
i
,
j
,
i
*
j
);
}
}
}