1 #![warn(clippy::needless_continue)]
15 #[allow(clippy::nonminimal_bool)]
21 if i % 2 == 0 && i % 3 == 0 {
23 println!("{}", i + 1);
25 println!("{}", i + 2);
28 println!("bar {} ", i);
38 // some comments that also should ideally be included in the
39 // output of the lint suggestion if possible.
40 if !(!(i == 2) || !(i == 5)) {
44 if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
57 continue; // should lint here
64 continue; // should lint here
71 continue // should lint here
79 continue // should lint here
84 fn condition() -> bool {
87 fn update_condition() {}
89 // only the outer loop has a label
98 continue 'outer; // should not lint here
104 continue 'outer; // should not lint here
113 // both loops have labels
117 'inner: while condition() {
122 continue 'outer; // should not lint here
130 continue 'inner; // should lint here
136 continue; // should lint here