]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/eq_op.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / eq_op.stderr
index dc2df524df252bcd9f5f6d13641d026913ec2e03..a1a257095c26afc6c31df4f76a1720c492dc6e81 100644 (file)
 error: this boolean expression can be simplified
-  --> $DIR/eq_op.rs:41:5
+  --> $DIR/eq_op.rs:44:5
    |
-41 |     true && true;
-   |     ^^^^^^^^^^^^
-   |
-note: lint level defined here
-  --> $DIR/eq_op.rs:7:8
+LL |     true && true;
+   |     ^^^^^^^^^^^^ help: try: `true`
    |
-7  | #[deny(nonminimal_bool)]
-   |        ^^^^^^^^^^^^^^^
-help: try
-   |     true;
+   = note: `-D clippy::nonminimal-bool` implied by `-D warnings`
 
 error: this boolean expression can be simplified
-  --> $DIR/eq_op.rs:43:5
+  --> $DIR/eq_op.rs:46:5
    |
-43 |     true || true;
-   |     ^^^^^^^^^^^^
-   |
-help: try
-   |     true;
+LL |     true || true;
+   |     ^^^^^^^^^^^^ help: try: `true`
 
 error: this boolean expression can be simplified
-  --> $DIR/eq_op.rs:49:5
+  --> $DIR/eq_op.rs:52:5
    |
-49 |     a == b && b == a;
-   |     ^^^^^^^^^^^^^^^^
-   |
-help: try
-   |     a == b;
+LL |     a == b && b == a;
+   |     ^^^^^^^^^^^^^^^^ help: try: `a == b`
 
 error: this boolean expression can be simplified
-  --> $DIR/eq_op.rs:51:5
-   |
-51 |     a != b && b != a;
-   |     ^^^^^^^^^^^^^^^^
+  --> $DIR/eq_op.rs:53:5
    |
-help: try
-   |     a != b;
+LL |     a != b && b != a;
+   |     ^^^^^^^^^^^^^^^^ help: try: `a != b`
 
 error: this boolean expression can be simplified
-  --> $DIR/eq_op.rs:53:5
+  --> $DIR/eq_op.rs:54:5
    |
-53 |     a < b && b > a;
-   |     ^^^^^^^^^^^^^^
-   |
-help: try
-   |     a < b;
+LL |     a < b && b > a;
+   |     ^^^^^^^^^^^^^^ help: try: `a < b`
 
 error: this boolean expression can be simplified
   --> $DIR/eq_op.rs:55:5
    |
-55 |     a <= b && b >= a;
-   |     ^^^^^^^^^^^^^^^^
-   |
-help: try
-   |     a <= b;
+LL |     a <= b && b >= a;
+   |     ^^^^^^^^^^^^^^^^ help: try: `a <= b`
 
 error: equal expressions as operands to `==`
-  --> $DIR/eq_op.rs:10:5
+  --> $DIR/eq_op.rs:17:5
    |
-10 |     1 == 1;
+LL |     1 == 1;
    |     ^^^^^^
    |
-note: lint level defined here
-  --> $DIR/eq_op.rs:4:8
-   |
-4  | #[deny(eq_op)]
-   |        ^^^^^
+   = note: `-D clippy::eq-op` implied by `-D warnings`
 
 error: equal expressions as operands to `==`
-  --> $DIR/eq_op.rs:11:5
+  --> $DIR/eq_op.rs:18:5
    |
-11 |     "no" == "no";
+LL |     "no" == "no";
    |     ^^^^^^^^^^^^
 
 error: equal expressions as operands to `!=`
-  --> $DIR/eq_op.rs:13:5
+  --> $DIR/eq_op.rs:20:5
    |
-13 |     false != false;
+LL |     false != false;
    |     ^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `<`
-  --> $DIR/eq_op.rs:14:5
+  --> $DIR/eq_op.rs:21:5
    |
-14 |     1.5 < 1.5;
+LL |     1.5 < 1.5;
    |     ^^^^^^^^^
 
 error: equal expressions as operands to `>=`
-  --> $DIR/eq_op.rs:15:5
+  --> $DIR/eq_op.rs:22:5
    |
-15 |     1u64 >= 1u64;
+LL |     1u64 >= 1u64;
    |     ^^^^^^^^^^^^
 
 error: equal expressions as operands to `&`
-  --> $DIR/eq_op.rs:18:5
+  --> $DIR/eq_op.rs:25:5
    |
-18 |     (1 as u64) & (1 as u64);
+LL |     (1 as u64) & (1 as u64);
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `^`
-  --> $DIR/eq_op.rs:19:5
+  --> $DIR/eq_op.rs:26:5
    |
-19 |     1 ^ ((((((1))))));
+LL |     1 ^ ((((((1))))));
    |     ^^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `<`
-  --> $DIR/eq_op.rs:22:5
+  --> $DIR/eq_op.rs:29:5
    |
-22 |     (-(2) < -(2));
+LL |     (-(2) < -(2));
    |     ^^^^^^^^^^^^^
 
 error: equal expressions as operands to `==`
-  --> $DIR/eq_op.rs:23:5
+  --> $DIR/eq_op.rs:30:5
    |
-23 |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
+LL |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `&`
-  --> $DIR/eq_op.rs:23:6
+  --> $DIR/eq_op.rs:30:6
    |
-23 |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
+LL |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
    |      ^^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `&`
-  --> $DIR/eq_op.rs:23:27
+  --> $DIR/eq_op.rs:30:27
    |
-23 |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
+LL |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
    |                           ^^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `==`
-  --> $DIR/eq_op.rs:27:5
+  --> $DIR/eq_op.rs:31:5
    |
-27 |     (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
+LL |     (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `!=`
-  --> $DIR/eq_op.rs:30:5
+  --> $DIR/eq_op.rs:34:5
    |
-30 |     ([1] != [1]);
+LL |     ([1] != [1]);
    |     ^^^^^^^^^^^^
 
 error: equal expressions as operands to `!=`
-  --> $DIR/eq_op.rs:31:5
+  --> $DIR/eq_op.rs:35:5
    |
-31 |     ((1, 2) != (1, 2));
+LL |     ((1, 2) != (1, 2));
    |     ^^^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `==`
-  --> $DIR/eq_op.rs:35:5
+  --> $DIR/eq_op.rs:39:5
    |
-35 |     1 + 1 == 2;
+LL |     1 + 1 == 2;
    |     ^^^^^^^^^^
 
 error: equal expressions as operands to `==`
-  --> $DIR/eq_op.rs:36:5
+  --> $DIR/eq_op.rs:40:5
    |
-36 |     1 - 1 == 0;
+LL |     1 - 1 == 0;
    |     ^^^^^^^^^^
 
 error: equal expressions as operands to `-`
-  --> $DIR/eq_op.rs:36:5
+  --> $DIR/eq_op.rs:40:5
    |
-36 |     1 - 1 == 0;
+LL |     1 - 1 == 0;
    |     ^^^^^
 
 error: equal expressions as operands to `-`
-  --> $DIR/eq_op.rs:39:5
+  --> $DIR/eq_op.rs:42:5
    |
-39 |     1 - 1;
+LL |     1 - 1;
    |     ^^^^^
 
 error: equal expressions as operands to `/`
-  --> $DIR/eq_op.rs:40:5
+  --> $DIR/eq_op.rs:43:5
    |
-40 |     1 / 1;
+LL |     1 / 1;
    |     ^^^^^
 
 error: equal expressions as operands to `&&`
-  --> $DIR/eq_op.rs:41:5
+  --> $DIR/eq_op.rs:44:5
    |
-41 |     true && true;
+LL |     true && true;
    |     ^^^^^^^^^^^^
 
 error: equal expressions as operands to `||`
-  --> $DIR/eq_op.rs:43:5
+  --> $DIR/eq_op.rs:46:5
    |
-43 |     true || true;
+LL |     true || true;
    |     ^^^^^^^^^^^^
 
 error: equal expressions as operands to `&&`
-  --> $DIR/eq_op.rs:49:5
+  --> $DIR/eq_op.rs:52:5
    |
-49 |     a == b && b == a;
+LL |     a == b && b == a;
    |     ^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `&&`
-  --> $DIR/eq_op.rs:51:5
+  --> $DIR/eq_op.rs:53:5
    |
-51 |     a != b && b != a;
+LL |     a != b && b != a;
    |     ^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `&&`
-  --> $DIR/eq_op.rs:53:5
+  --> $DIR/eq_op.rs:54:5
    |
-53 |     a < b && b > a;
+LL |     a < b && b > a;
    |     ^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `&&`
   --> $DIR/eq_op.rs:55:5
    |
-55 |     a <= b && b >= a;
+LL |     a <= b && b >= a;
    |     ^^^^^^^^^^^^^^^^
 
 error: equal expressions as operands to `==`
-  --> $DIR/eq_op.rs:59:5
+  --> $DIR/eq_op.rs:58:5
    |
-59 |     a == a;
+LL |     a == a;
    |     ^^^^^^
 
-error: aborting due to 32 previous errors
+error: taken reference of right operand
+  --> $DIR/eq_op.rs:96:13
+   |
+LL |     let z = x & &y;
+   |             ^^^^--
+   |                 |
+   |                 help: use the right value directly: `y`
+   |
+   = note: `-D clippy::op-ref` implied by `-D warnings`
+
+error: equal expressions as operands to `/`
+  --> $DIR/eq_op.rs:104:20
+   |
+LL |     const D: u32 = A / A;
+   |                    ^^^^^
+
+error: aborting due to 34 previous errors