条件必须是bool类型,因为Rust不像其他语言会把非bool类型转换为bool类型。 ... loop { num += 1; if num == 10 { break; } println!("Hi!"); }}.
確定! 回上一頁