mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-20 03:40:36 +00:00
21 lines
381 B
Rust
21 lines
381 B
Rust
#![allow(clippy::iter_next_slice, clippy::needless_return)]
|
|
|
|
fn no_break_or_continue_loop() {
|
|
for i in [1, 2, 3].iter() {
|
|
//~^ never_loop
|
|
return;
|
|
}
|
|
}
|
|
|
|
fn no_break_or_continue_loop_outer() {
|
|
for i in [1, 2, 3].iter() {
|
|
//~^ never_loop
|
|
return;
|
|
loop {
|
|
if true {
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|