summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui-toml/verbose_bit_mask/verbose_bit_mask.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui-toml/verbose_bit_mask/verbose_bit_mask.fixed')
-rw-r--r--src/tools/clippy/tests/ui-toml/verbose_bit_mask/verbose_bit_mask.fixed7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui-toml/verbose_bit_mask/verbose_bit_mask.fixed b/src/tools/clippy/tests/ui-toml/verbose_bit_mask/verbose_bit_mask.fixed
new file mode 100644
index 000000000..437692a4d
--- /dev/null
+++ b/src/tools/clippy/tests/ui-toml/verbose_bit_mask/verbose_bit_mask.fixed
@@ -0,0 +1,7 @@
+#![warn(clippy::verbose_bit_mask)]
+fn main() {
+ let v: i32 = 0;
+ let _ = v & 0b11111 == 0;
+ let _ = v.trailing_zeros() >= 6;
+ //~^ ERROR: bit mask could be simplified
+}