Sign in
fuchsia
/
third_party
/
rust
/
7e8a8c9cb152530c9833a389e7a7d79c7db693cc
/
.
/
tests
/
ui
/
for-loop-while
/
foreach-external-iterators-break.rs
blob: ddeb610d7e417d701b923154db22d50baa423941 [
file
] [
log
] [
blame
]
//@ run-pass
pub
fn
main
()
{
let
x
=
[
1
;
100
];
let
mut
y
=
0
;
for
i in
&
x
[..]
{
if
y
>
10
{
break
;
}
y
+=
*
i
;
}
assert_eq
!(
y
,
11
);
}