Skip to content

Instantly share code, notes, and snippets.

@toshimasa-nanaki
Created December 3, 2018 13:50
Show Gist options
  • Save toshimasa-nanaki/10618ce698bd993e540e7409d0d24dd5 to your computer and use it in GitHub Desktop.
Save toshimasa-nanaki/10618ce698bd993e540e7409d0d24dd5 to your computer and use it in GitHub Desktop.
Rust ループ(ラベル)
fn main() {
//ループラベル
'outer: for i in 0..10 {
'inner: for j in 1..11 {
if i % 2 != 0 { continue 'outer; }
if j % 2 == 0 { continue 'inner; }
println!("i: {}, j: {}", i, j);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment