fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1#![allow(unused_parens)] 2#![warn(clippy::verbose_bit_mask)] 3 4fn main() { 5 let x: i32 = 42; 6 let _ = x.trailing_zeros() >= 4; 7 //~^ ERROR: bit mask could be simplified with a call to `trailing_zeros` 8 //~| NOTE: `-D clippy::verbose-bit-mask` implied by `-D warnings` 9 let _ = x.trailing_zeros() >= 5; 10 //~^ ERROR: bit mask could be simplified with a call to `trailing_zeros` 11 let _ = x & 0b1_1010 == 0; // do not lint 12 let _ = x & 1 == 0; // do not lint 13}