]> git.lizzy.rs Git - rust.git/commitdiff
Update to latest rustc diagnostic output
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Tue, 1 Aug 2017 11:11:48 +0000 (13:11 +0200)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Tue, 1 Aug 2017 11:11:48 +0000 (13:11 +0200)
clippy_tests/examples/bit_masks.stderr
clippy_tests/examples/trailing_zeros.rs
clippy_tests/examples/trailing_zeros.stderr

index 64f5e0f2045620a554dd4866eecb2d35560b7457..4c16ed3fec306f819345f32740fec5e1b8796c21 100644 (file)
@@ -10,7 +10,7 @@ error: bit mask could be simplified with a call to `trailing_zeros`
   --> bit_masks.rs:12:5
    |
 12 |     x & 0 == 0;
-   |     ^^^^^^^^^^ help: try `x.trailing_zeros() > 0`
+   |     ^^^^^^^^^^ help: try: `x.trailing_zeros() > 0`
    |
    = note: `-D verbose-bit-mask` implied by `-D warnings`
 
@@ -18,7 +18,7 @@ error: bit mask could be simplified with a call to `trailing_zeros`
   --> bit_masks.rs:14:5
    |
 14 |     x & 1 == 0; //ok, compared with zero
-   |     ^^^^^^^^^^ help: try `x.trailing_zeros() > 1`
+   |     ^^^^^^^^^^ help: try: `x.trailing_zeros() > 1`
 
 error: incompatible bit mask: `_ & 2` can never be equal to `1`
   --> bit_masks.rs:15:5
index ff73228f3f73654a77662e2d4cab469cc88156c2..40f588cecef2e82a479e62e5f800286aa6e1e2f1 100644 (file)
@@ -5,6 +5,6 @@
 fn main() {
     let x: i32 = 42;
     let _ = #[clippy(author)] (x & 0b1111 == 0);  // suggest trailing_zeros
-    let _ = x & 0b11111 == 0; // suggest trailing_zeros
-    let _ = x & 0b11010 == 0; // do not lint
+    let _ = x & 0b1_1111 == 0; // suggest trailing_zeros
+    let _ = x & 0b1_1010 == 0; // do not lint
 }
index 4fb608c7bf15906df5c8530c4c024c70434cd5e2..1b0ebf7d3c8593975b237a1908d483d8f75c48c6 100644 (file)
@@ -2,15 +2,15 @@ error: bit mask could be simplified with a call to `trailing_zeros`
  --> trailing_zeros.rs:7:31
   |
 7 |     let _ = #[clippy(author)] (x & 0b1111 == 0);  // suggest trailing_zeros
-  |                               ^^^^^^^^^^^^^^^^^ help: try `x.trailing_zeros() > 4`
+  |                               ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() > 4`
   |
   = note: `-D verbose-bit-mask` implied by `-D warnings`
 
 error: bit mask could be simplified with a call to `trailing_zeros`
  --> trailing_zeros.rs:8:13
   |
-8 |     let _ = x & 0b11111 == 0; // suggest trailing_zeros
-  |             ^^^^^^^^^^^^^^^^ help: try `x.trailing_zeros() > 5`
+8 |     let _ = x & 0b1_1111 == 0; // suggest trailing_zeros
+  |             ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() > 5`
 
 error: aborting due to 2 previous errors