Sign in
android
/
toolchain
/
rustc
/
43f0694b1feb1296004d84509e01177159e71be0
/
.
/
src
/
test
/
ui
/
for-loop-while
/
for-loop-into-iterator.rs
blob: 199d4ddb2993a4e6f78445262b6ce15a2ddc13c7 [
file
] [
log
] [
blame
]
// run-pass
// Test that for loops can do what RFC #235 claims
fn
main
()
{
let
mut
v
=
vec
![
1
];
for
x in
&
v
{
assert_eq
!(
x
,
&
1
);
}
for
x in
&
mut
v
{
assert_eq
!(
x
,
&
mut
1
);
}
for
x in v
{
assert_eq
!(
x
,
1
);
}
}