]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/bit_mask.rs
Auto merge of #3946 - rchaser53:issue-3920, r=flip1995
[rust.git] / clippy_lints / src / bit_mask.rs
index c57b1c5366c4d203ec589bf8e06c52bb11826897..76314a610b16ad2c77dabb7e0c022bbdc5ff9fc4 100644 (file)
@@ -37,8 +37,9 @@
     /// **Known problems:** None.
     ///
     /// **Example:**
-    /// ```ignore
-    /// if (x & 1 == 2) { … }
+    /// ```rust
+    /// # let x = 1;
+    /// if (x & 1 == 2) { }
     /// ```
     pub BAD_BIT_MASK,
     correctness,
@@ -65,8 +66,9 @@
     /// uncommon).
     ///
     /// **Example:**
-    /// ```ignore
-    /// if (x | 1 > 3) { … }
+    /// ```rust
+    /// # let x = 1;
+    /// if (x | 1 > 3) {  }
     /// ```
     pub INEFFECTIVE_BIT_MASK,
     correctness,
@@ -83,8 +85,9 @@
     /// **Known problems:** llvm generates better code for `x & 15 == 0` on x86
     ///
     /// **Example:**
-    /// ```ignore
-    /// x & 0x1111 == 0
+    /// ```rust
+    /// # let x = 1;
+    /// if x & 0x1111 == 0 { }
     /// ```
     pub VERBOSE_BIT_MASK,
     style,