]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/trailing_zeros.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / trailing_zeros.rs
CommitLineData
ea8adc8c 1#![feature(plugin, custom_attribute, stmt_expr_attributes)]
abe05a73 2
ea8adc8c
XL
3#![allow(unused_parens)]
4
5fn main() {
6 let x: i32 = 42;
7 let _ = #[clippy(author)] (x & 0b1111 == 0); // suggest trailing_zeros
8 let _ = x & 0b1_1111 == 0; // suggest trailing_zeros
9 let _ = x & 0b1_1010 == 0; // do not lint
abe05a73 10 let _ = x & 1 == 0; // do not lint
ea8adc8c 11}