Skip to content

Commit

Permalink
Remove clippy::author attribute from trailing_zeroes test
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Sep 27, 2019
1 parent b67dfb4 commit fff6b0e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 22 deletions.
4 changes: 1 addition & 3 deletions tests/ui/trailing_zeros.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#![feature(stmt_expr_attributes)]
#![allow(unused_parens)]

fn main() {
let x: i32 = 42;
let _ = #[clippy::author]
(x & 0b1111 == 0); // suggest trailing_zeros
let _ = (x & 0b1111 == 0); // suggest trailing_zeros
let _ = x & 0b1_1111 == 0; // suggest trailing_zeros
let _ = x & 0b1_1010 == 0; // do not lint
let _ = x & 1 == 0; // do not lint
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/trailing_zeros.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: bit mask could be simplified with a call to `trailing_zeros`
--> $DIR/trailing_zeros.rs:7:5
--> $DIR/trailing_zeros.rs:5:13
|
LL | (x & 0b1111 == 0); // suggest trailing_zeros
| ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() >= 4`
LL | let _ = (x & 0b1111 == 0); // suggest trailing_zeros
| ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() >= 4`
|
= note: `-D clippy::verbose-bit-mask` implied by `-D warnings`

error: bit mask could be simplified with a call to `trailing_zeros`
--> $DIR/trailing_zeros.rs:8:13
--> $DIR/trailing_zeros.rs:6:13
|
LL | let _ = x & 0b1_1111 == 0; // suggest trailing_zeros
| ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() >= 5`
Expand Down
15 changes: 0 additions & 15 deletions tests/ui/trailing_zeros.stdout

This file was deleted.

0 comments on commit fff6b0e

Please sign in to comment.