]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/booleans.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / booleans.stderr
index a15267f22637b61ad5255bf87d073ad03047d6fe..05696ba0f59b5aa297553dc05811f54558684782 100644 (file)
@@ -49,18 +49,6 @@ error: this boolean expression can be simplified
 18 |     let _ = false || a;
    |             ^^^^^^^^^^ help: try: `a`
 
-error: this boolean expression contains a logic bug
-  --> $DIR/booleans.rs:20:13
-   |
-20 |     let _ = cfg!(you_shall_not_not_pass) && a;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: it would look like the following: `false`
-   |
-help: this expression can be optimized out by applying boolean operations to the outer expression
-  --> $DIR/booleans.rs:20:45
-   |
-20 |     let _ = cfg!(you_shall_not_not_pass) && a;
-   |                                             ^
-
 error: this boolean expression can be simplified
   --> $DIR/booleans.rs:23:13
    |
@@ -142,5 +130,33 @@ help: try
 39 |     let _ = !(a == b && c == d);
    |             ^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 14 previous errors
+error: this boolean expression can be simplified
+  --> $DIR/booleans.rs:47:13
+   |
+47 |     let _ = !a.is_some();
+   |             ^^^^^^^^^^^^ help: try: `a.is_none()`
+
+error: this boolean expression can be simplified
+  --> $DIR/booleans.rs:49:13
+   |
+49 |     let _ = !a.is_none();
+   |             ^^^^^^^^^^^^ help: try: `a.is_some()`
+
+error: this boolean expression can be simplified
+  --> $DIR/booleans.rs:51:13
+   |
+51 |     let _ = !b.is_err();
+   |             ^^^^^^^^^^^ help: try: `b.is_ok()`
+
+error: this boolean expression can be simplified
+  --> $DIR/booleans.rs:53:13
+   |
+53 |     let _ = !b.is_ok();
+   |             ^^^^^^^^^^ help: try: `b.is_err()`
+
+error: this boolean expression can be simplified
+  --> $DIR/booleans.rs:55:13
+   |
+55 |     let _ = !(a.is_some() && !c);
+   |             ^^^^^^^^^^^^^^^^^^^^ help: try: `c || a.is_none()`