pan class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>x</span>),
        <span class='prelude-val'>None</span> <span class='op'>=&gt;</span> <span class='kw'>break</span>,
    }
}</pre>

<!-- Into code like this: -->

<p><code>while let</code> を用いることで、以下のように書くことができます:</p>

<span class='rusttest'>fn main() {
    let mut v = vec![1, 3, 5, 7, 11];
while let Some(x) = v.pop() {
    println!(&quot