]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/len_zero_ranges.rs
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
[rust.git] / src / tools / clippy / tests / ui / len_zero_ranges.rs
1 // run-rustfix
2
3 #![warn(clippy::len_zero)]
4 #![allow(unused)]
5
6 // Now that `Range(Inclusive)::is_empty` is stable (1.47), we can always suggest this
7 mod issue_3807 {
8     fn suggestion_is_fine_range() {
9         let _ = (0..42).len() == 0;
10     }
11
12     fn suggestion_is_fine_range_inclusive() {
13         let _ = (0_u8..=42).len() == 0;
14     }
15 }
16
17 fn main() {}