]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/len_zero_ranges.rs
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
[rust.git] / src / tools / clippy / tests / ui / len_zero_ranges.rs
index be7b4244bc06c4d27463f35de2181ca23ab2c20a..a0eb51cc9760c462372dddaaa31819db94541efe 100644 (file)
@@ -1,14 +1,17 @@
 // run-rustfix
 
-#![feature(range_is_empty)]
 #![warn(clippy::len_zero)]
 #![allow(unused)]
 
+// Now that `Range(Inclusive)::is_empty` is stable (1.47), we can always suggest this
 mod issue_3807 {
-    // With the feature enabled, `is_empty` should be suggested
-    fn suggestion_is_fine() {
+    fn suggestion_is_fine_range() {
         let _ = (0..42).len() == 0;
     }
+
+    fn suggestion_is_fine_range_inclusive() {
+        let _ = (0_u8..=42).len() == 0;
+    }
 }
 
 fn main() {}