]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/len_zero_ranges.fixed
Auto merge of #97944 - nikic:freebsd-update, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / len_zero_ranges.fixed
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).is_empty();
10     }
11
12     fn suggestion_is_fine_range_inclusive() {
13         let _ = (0_u8..=42).is_empty();
14     }
15 }
16
17 fn main() {}