The Rust docs include a surprisingly readable example of how `for` loops desugar into essentially a while loop with a pattern match: https://doc.rust-lang.org/nightly/std/iter/#for-loops-and-intoiterator