Le 12/08/2013 18:23, Micah Chalmer a écrit :
The for-loop already knows how it exited.
It only "knows" if something explicitly makes it know. This boils
down to one of two things: either the boolean flag approach as
discussed earlier, or the compiler turning every "break" in the block
into an explicit call to the else block.
No, it’s the opposite. The for-else loop jumps to the else block when
the iterator’s next() returns None.
--
Simon Sapin
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev