Skip to content

Commit d255efc

Browse files
committed
Auto merge of #13026 - alex-semenyuk:fix_doc_verbose_bit_mask_example, r=Manishearth
Fix doc for INEFFECTIVE_BIT_MASK and VERBOSE_BIT_MASK Minor fixes for doc for INEFFECTIVE_BIT_MASK and VERBOSE_BIT_MASK changelog: [none]
2 parents f24a870 + 0dddf6e commit d255efc

File tree

1 file changed

+14
-0
lines changed
  • clippy_lints/src/operators

1 file changed

+14
-0
lines changed

clippy_lints/src/operators/mod.rs

+14
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ declare_clippy_lint! {
242242
/// # let x = 1;
243243
/// if (x | 1 > 3) { }
244244
/// ```
245+
///
246+
/// Use instead:
247+
///
248+
/// ```no_run
249+
/// # let x = 1;
250+
/// if (x >= 2) { }
251+
/// ```
245252
#[clippy::version = "pre 1.29.0"]
246253
pub INEFFECTIVE_BIT_MASK,
247254
correctness,
@@ -265,6 +272,13 @@ declare_clippy_lint! {
265272
/// # let x = 1;
266273
/// if x & 0b1111 == 0 { }
267274
/// ```
275+
///
276+
/// Use instead:
277+
///
278+
/// ```no_run
279+
/// # let x: i32 = 1;
280+
/// if x.trailing_zeros() > 4 { }
281+
/// ```
268282
#[clippy::version = "pre 1.29.0"]
269283
pub VERBOSE_BIT_MASK,
270284
pedantic,

0 commit comments

Comments
 (0)