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