This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
cb239cc028
rust
/
src
/
test
/
run-pass
/
loop-scope.rs
6 lines
111 B
Rust
Raw
Normal View
History
Unescape
Escape
Resolve loop collection expressions in the right scope Closes #745
2011-07-26 08:50:15 -05:00
fn
main
(
)
{
Reformat for new syntax
2011-07-27 07:19:39 -05:00
let
x
=
~
[
10
,
20
,
30
]
;
let
sum
=
0
;
for
x
in
x
{
sum
+
=
x
;
}
assert
(
sum
=
=
60
)
;
}
Reference in New Issue
Copy Permalink