1 #![warn(clippy::needless_continue)]
2 #![allow(clippy::uninlined_format_args)]
10 macro_rules! nonzero {
16 #[allow(clippy::nonminimal_bool)]
22 if i % 2 == 0 && i % 3 == 0 {
24 println!("{}", i + 1);
26 println!("{}", i + 2);
29 println!("bar {} ", i);
39 // some comments that also should ideally be included in the
40 // output of the lint suggestion if possible.
41 if !(!(i == 2) || !(i == 5)) {
45 if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
58 continue; // should lint here
65 continue; // should lint here
72 continue // should lint here
80 continue // should lint here
85 fn condition() -> bool {
88 fn update_condition() {}
90 // only the outer loop has a label
99 continue 'outer; // should not lint here
105 continue 'outer; // should not lint here
114 // both loops have labels
118 'inner: while condition() {
123 continue 'outer; // should not lint here
131 continue 'inner; // should lint here
137 continue; // should lint here