-error: this boolean expression can be simplified
- --> $DIR/eq_op.rs:41:5
- |
-41 | true && true;
- | ^^^^^^^^^^^^
- |
-note: lint level defined here
- --> $DIR/eq_op.rs:7:8
- |
-7 | #[deny(nonminimal_bool)]
- | ^^^^^^^^^^^^^^^
-help: try
- | true;
-
-error: this boolean expression can be simplified
- --> $DIR/eq_op.rs:43:5
- |
-43 | true || true;
- | ^^^^^^^^^^^^
- |
-help: try
- | true;
-
-error: this boolean expression can be simplified
- --> $DIR/eq_op.rs:49:5
- |
-49 | 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;
- | ^^^^^^^^^^^^^^^^
- |
-help: try
- | a != b;
-
-error: this boolean expression can be simplified
- --> $DIR/eq_op.rs:53:5
- |
-53 | 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;
-
error: equal expressions as operands to `==`
- --> $DIR/eq_op.rs:10:5
- |
-10 | 1 == 1;
- | ^^^^^^
+ --> $DIR/eq_op.rs:8:13
|
-note: lint level defined here
- --> $DIR/eq_op.rs:4:8
+LL | let _ = 1 == 1;
+ | ^^^^^^
|
-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:9:13
|
-11 | "no" == "no";
- | ^^^^^^^^^^^^
+LL | let _ = "no" == "no";
+ | ^^^^^^^^^^^^
error: equal expressions as operands to `!=`
- --> $DIR/eq_op.rs:13:5
+ --> $DIR/eq_op.rs:11:13
|
-13 | false != false;
- | ^^^^^^^^^^^^^^
+LL | let _ = false != false;
+ | ^^^^^^^^^^^^^^
error: equal expressions as operands to `<`
- --> $DIR/eq_op.rs:14:5
+ --> $DIR/eq_op.rs:12:13
|
-14 | 1.5 < 1.5;
- | ^^^^^^^^^
+LL | let _ = 1.5 < 1.5;
+ | ^^^^^^^^^
error: equal expressions as operands to `>=`
- --> $DIR/eq_op.rs:15:5
+ --> $DIR/eq_op.rs:13:13
|
-15 | 1u64 >= 1u64;
- | ^^^^^^^^^^^^
+LL | let _ = 1u64 >= 1u64;
+ | ^^^^^^^^^^^^
error: equal expressions as operands to `&`
- --> $DIR/eq_op.rs:18:5
+ --> $DIR/eq_op.rs:16:13
|
-18 | (1 as u64) & (1 as u64);
- | ^^^^^^^^^^^^^^^^^^^^^^^
+LL | let _ = (1u32 as u64) & (1u32 as u64);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `^`
- --> $DIR/eq_op.rs:19:5
+ --> $DIR/eq_op.rs:19:17
|
-19 | 1 ^ ((((((1))))));
- | ^^^^^^^^^^^^^^^^^
+LL | let _ = 1 ^ ((((((1))))));
+ | ^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `<`
- --> $DIR/eq_op.rs:22:5
+ --> $DIR/eq_op.rs:23:13
|
-22 | (-(2) < -(2));
- | ^^^^^^^^^^^^^
+LL | let _ = (-(2) < -(2));
+ | ^^^^^^^^^^^^^
error: equal expressions as operands to `==`
- --> $DIR/eq_op.rs:23:5
+ --> $DIR/eq_op.rs:24:13
|
-23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | let _ = ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&`
- --> $DIR/eq_op.rs:23:6
+ --> $DIR/eq_op.rs:24:14
|
-23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
- | ^^^^^^^^^^^^^^^^^
+LL | let _ = ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
+ | ^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&`
- --> $DIR/eq_op.rs:23:27
+ --> $DIR/eq_op.rs:24:35
|
-23 | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
- | ^^^^^^^^^^^^^^^^^
+LL | let _ = ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
+ | ^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `==`
- --> $DIR/eq_op.rs:27:5
+ --> $DIR/eq_op.rs:25:13
|
-27 | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | let _ = (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `!=`
- --> $DIR/eq_op.rs:30:5
+ --> $DIR/eq_op.rs:28:13
|
-30 | ([1] != [1]);
- | ^^^^^^^^^^^^
+LL | let _ = ([1] != [1]);
+ | ^^^^^^^^^^^^
error: equal expressions as operands to `!=`
- --> $DIR/eq_op.rs:31:5
+ --> $DIR/eq_op.rs:29:13
|
-31 | ((1, 2) != (1, 2));
- | ^^^^^^^^^^^^^^^^^^
+LL | let _ = ((1, 2) != (1, 2));
+ | ^^^^^^^^^^^^^^^^^^
error: equal expressions as operands to `==`
- --> $DIR/eq_op.rs:35:5
+ --> $DIR/eq_op.rs:33:13
|
-35 | 1 + 1 == 2;
- | ^^^^^^^^^^
+LL | let _ = 1 + 1 == 2;
+ | ^^^^^^^^^^
error: equal expressions as operands to `==`
- --> $DIR/eq_op.rs:36:5
+ --> $DIR/eq_op.rs:34:13
|
-36 | 1 - 1 == 0;
- | ^^^^^^^^^^
+LL | let _ = 1 - 1 == 0;
+ | ^^^^^^^^^^
error: equal expressions as operands to `-`
- --> $DIR/eq_op.rs:36:5
+ --> $DIR/eq_op.rs:34:13
|
-36 | 1 - 1 == 0;
- | ^^^^^
+LL | let _ = 1 - 1 == 0;
+ | ^^^^^
error: equal expressions as operands to `-`
- --> $DIR/eq_op.rs:39:5
+ --> $DIR/eq_op.rs:36:13
|
-39 | 1 - 1;
- | ^^^^^
+LL | let _ = 1 - 1;
+ | ^^^^^
error: equal expressions as operands to `/`
- --> $DIR/eq_op.rs:40:5
+ --> $DIR/eq_op.rs:37:13
|
-40 | 1 / 1;
- | ^^^^^
+LL | let _ = 1 / 1;
+ | ^^^^^
error: equal expressions as operands to `&&`
- --> $DIR/eq_op.rs:41:5
+ --> $DIR/eq_op.rs:38:13
|
-41 | true && true;
- | ^^^^^^^^^^^^
+LL | let _ = true && true;
+ | ^^^^^^^^^^^^
error: equal expressions as operands to `||`
- --> $DIR/eq_op.rs:43:5
+ --> $DIR/eq_op.rs:40:13
|
-43 | true || true;
- | ^^^^^^^^^^^^
+LL | let _ = true || true;
+ | ^^^^^^^^^^^^
error: equal expressions as operands to `&&`
- --> $DIR/eq_op.rs:49:5
+ --> $DIR/eq_op.rs:45:13
|
-49 | a == b && b == a;
- | ^^^^^^^^^^^^^^^^
+LL | let _ = a == b && b == a;
+ | ^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&&`
- --> $DIR/eq_op.rs:51:5
+ --> $DIR/eq_op.rs:46:13
|
-51 | a != b && b != a;
- | ^^^^^^^^^^^^^^^^
+LL | let _ = a != b && b != a;
+ | ^^^^^^^^^^^^^^^^
error: equal expressions as operands to `&&`
- --> $DIR/eq_op.rs:53:5
+ --> $DIR/eq_op.rs:47:13
|
-53 | a < b && b > a;
- | ^^^^^^^^^^^^^^
+LL | let _ = a < b && b > a;
+ | ^^^^^^^^^^^^^^
error: equal expressions as operands to `&&`
- --> $DIR/eq_op.rs:55:5
+ --> $DIR/eq_op.rs:48:13
|
-55 | a <= b && b >= a;
- | ^^^^^^^^^^^^^^^^
+LL | let _ = a <= b && b >= a;
+ | ^^^^^^^^^^^^^^^^
error: equal expressions as operands to `==`
- --> $DIR/eq_op.rs:59:5
+ --> $DIR/eq_op.rs:51:13
|
-59 | a == a;
- | ^^^^^^
+LL | let _ = a == a;
+ | ^^^^^^
-warning: taken reference of right operand
- --> $DIR/eq_op.rs:97:13
+error: equal expressions as operands to `/`
+ --> $DIR/eq_op.rs:61:20
|
-97 | let z = x & &y;
- | ^^^^^^
+LL | const D: u32 = A / A;
+ | ^^^^^
+
+error: equal expressions as operands to `==`
+ --> $DIR/eq_op.rs:92:5
|
- = note: #[warn(op_ref)] on by default
-help: use the right value directly
- | let z = y & &y;
+LL | (n1.inner.0).0 == (n1.inner.0).0 && (n1.inner.1).0 == (n2.inner.1).0 && (n1.inner.2).0 == (n2.inner.2).0
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to 32 previous errors
+error: aborting due to 28 previous errors