Skip to content

Commit d6185f9

Browse files
committed
Unbreak the clippy test
1 parent c20ad72 commit d6185f9

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/tools/clippy/tests/ui/len_zero_ranges.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![feature(range_is_empty)]
44
#![warn(clippy::len_zero)]
55
#![allow(unused)]
6+
#![allow(stable_features)] // TODO: https://github.com/rust-lang/rust-clippy/issues/5956
67

78
mod issue_3807 {
89
// With the feature enabled, `is_empty` should be suggested

src/tools/clippy/tests/ui/len_zero_ranges.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![feature(range_is_empty)]
44
#![warn(clippy::len_zero)]
55
#![allow(unused)]
6+
#![allow(stable_features)] // TODO: https://github.com/rust-lang/rust-clippy/issues/5956
67

78
mod issue_3807 {
89
// With the feature enabled, `is_empty` should be suggested

src/tools/clippy/tests/ui/len_zero_ranges.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: length comparison to zero
2-
--> $DIR/len_zero_ranges.rs:10:17
2+
--> $DIR/len_zero_ranges.rs:11:17
33
|
44
LL | let _ = (0..42).len() == 0;
55
| ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(0..42).is_empty()`

0 commit comments

Comments
 (0)