2023-04-23 06:03:09 -05:00
|
|
|
//@run-rustfix
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
#![warn(clippy::len_zero)]
|
|
|
|
#![allow(unused)]
|
|
|
|
|
2020-08-28 09:10:16 -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-28 09:10:16 -05:00
|
|
|
fn suggestion_is_fine_range() {
|
2020-06-09 09:36:01 -05:00
|
|
|
let _ = (0..42).is_empty();
|
|
|
|
}
|
2020-08-28 09:10:16 -05:00
|
|
|
|
|
|
|
fn suggestion_is_fine_range_inclusive() {
|
|
|
|
let _ = (0_u8..=42).is_empty();
|
|
|
|
}
|
2020-06-09 09:36:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|