]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/len_zero_ranges.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[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() {}