summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/len_zero_ranges.rs
blob: be2e0f38fd164cbef647318ba40846f0b915acff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-rustfix

#![feature(range_is_empty)]
#![warn(clippy::len_zero)]
#![allow(unused)]
#![allow(stable_features)] // TODO: https://github.com/rust-lang/rust-clippy/issues/5956

mod issue_3807 {
    // With the feature enabled, `is_empty` should be suggested
    fn suggestion_is_fine() {
        let _ = (0..42).len() == 0;
    }
}

fn main() {}