2023-04-20 14:37:15 +00:00
|
|
|
//@run-rustfix
|
2020-06-09 14:36:01 +00:00
|
|
|
|
|
|
|
#![warn(clippy::len_zero)]
|
|
|
|
#![allow(unused)]
|
|
|
|
|
2020-08-25 12:05:02 -07:00
|
|
|
// Now that `Range(Inclusive)::is_empty` is stable (1.47), we can always suggest this
|
2020-06-09 14:36:01 +00:00
|
|
|
mod issue_3807 {
|
2020-08-25 12:05:02 -07:00
|
|
|
fn suggestion_is_fine_range() {
|
2020-06-09 14:36:01 +00:00
|
|
|
let _ = (0..42).len() == 0;
|
|
|
|
}
|
2020-08-25 12:05:02 -07:00
|
|
|
|
|
|
|
fn suggestion_is_fine_range_inclusive() {
|
|
|
|
let _ = (0_u8..=42).len() == 0;
|
|
|
|
}
|
2020-06-09 14:36:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|