]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/len_zero_ranges.fixed
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / len_zero_ranges.fixed
CommitLineData
f20569fa
XL
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
7mod 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
17fn main() {}