2 #![warn(clippy::reversed_empty_ranges)]
3 #![allow(clippy::uninlined_format_args)]
6 const MAX_LEN: usize = 42;
21 // not an error, this is the range with only one element “5”
26 // not an error, the start index is less than the end index
35 for i in (10..0).map(|x| x * 2) {
39 // testing that the empty range lint folds constants
44 for i in (5 + 2)..(3 - 1) {
48 for i in (2 * 2)..(2 * 3) {
49 // no error, 4..6 is fine
55 // no error, not constant-foldable