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