mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
37 lines
528 B
Rust
37 lines
528 B
Rust
|
#![feature(stmt_expr_attributes)]
|
||
|
#![allow(clippy::never_loop, clippy::while_immutable_condition)]
|
||
|
|
||
|
fn main() {
|
||
|
#[clippy::author]
|
||
|
for y in 0..10 {
|
||
|
let z = y;
|
||
|
}
|
||
|
|
||
|
#[clippy::author]
|
||
|
for _ in 0..10 {
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
#[clippy::author]
|
||
|
'label: for _ in 0..10 {
|
||
|
break 'label;
|
||
|
}
|
||
|
|
||
|
let a = true;
|
||
|
|
||
|
#[clippy::author]
|
||
|
while a {
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
#[clippy::author]
|
||
|
while let true = a {
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
#[clippy::author]
|
||
|
loop {
|
||
|
break;
|
||
|
}
|
||
|
}
|