mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 08:30:45 +00:00
15 lines
336 B
Rust
15 lines
336 B
Rust
#![warn(clippy::len_zero)]
|
|
#![allow(unused)]
|
|
|
|
// Now that `Range(Inclusive)::is_empty` is stable (1.47), we can always suggest this
|
|
mod issue_3807 {
|
|
fn suggestion_is_fine_range() {
|
|
let _ = (0..42).len() == 0;
|
|
}
|
|
|
|
fn suggestion_is_fine_range_inclusive() {
|
|
let _ = (0_u8..=42).len() == 0;
|
|
}
|
|
}
|
|
|
|
fn main() {}
|