Skip to content

Commit

Permalink
Unbreak the clippy test
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm committed Aug 24, 2020
1 parent c20ad72 commit d6185f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/len_zero_ranges.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![feature(range_is_empty)]
#![warn(clippy::len_zero)]
#![allow(unused)]
#![allow(stable_features)] // TODO: https://github.com/rust-lang/rust-clippy/issues/5956

mod issue_3807 {
// With the feature enabled, `is_empty` should be suggested
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/len_zero_ranges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![feature(range_is_empty)]
#![warn(clippy::len_zero)]
#![allow(unused)]
#![allow(stable_features)] // TODO: https://github.com/rust-lang/rust-clippy/issues/5956

mod issue_3807 {
// With the feature enabled, `is_empty` should be suggested
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/tests/ui/len_zero_ranges.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: length comparison to zero
--> $DIR/len_zero_ranges.rs:10:17
--> $DIR/len_zero_ranges.rs:11:17
|
LL | let _ = (0..42).len() == 0;
| ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(0..42).is_empty()`
Expand Down

0 comments on commit d6185f9

Please sign in to comment.