mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
52 lines
1.2 KiB
Text
52 lines
1.2 KiB
Text
error: the operation is ineffective. Consider reducing it to `x`
|
|
--> $DIR/identity_op.rs:25:5
|
|
|
|
|
25 | x + 0;
|
|
| ^^^^^
|
|
|
|
|
= note: `-D clippy::identity-op` implied by `-D warnings`
|
|
|
|
error: the operation is ineffective. Consider reducing it to `x`
|
|
--> $DIR/identity_op.rs:26:5
|
|
|
|
|
26 | x + (1 - 1);
|
|
| ^^^^^^^^^^^
|
|
|
|
error: the operation is ineffective. Consider reducing it to `x`
|
|
--> $DIR/identity_op.rs:28:5
|
|
|
|
|
28 | 0 + x;
|
|
| ^^^^^
|
|
|
|
error: the operation is ineffective. Consider reducing it to `x`
|
|
--> $DIR/identity_op.rs:31:5
|
|
|
|
|
31 | x | (0);
|
|
| ^^^^^^^
|
|
|
|
error: the operation is ineffective. Consider reducing it to `x`
|
|
--> $DIR/identity_op.rs:34:5
|
|
|
|
|
34 | x * 1;
|
|
| ^^^^^
|
|
|
|
error: the operation is ineffective. Consider reducing it to `x`
|
|
--> $DIR/identity_op.rs:35:5
|
|
|
|
|
35 | 1 * x;
|
|
| ^^^^^
|
|
|
|
error: the operation is ineffective. Consider reducing it to `x`
|
|
--> $DIR/identity_op.rs:41:5
|
|
|
|
|
41 | -1 & x;
|
|
| ^^^^^^
|
|
|
|
error: the operation is ineffective. Consider reducing it to `u`
|
|
--> $DIR/identity_op.rs:44:5
|
|
|
|
|
44 | u & 255;
|
|
| ^^^^^^^
|
|
|
|
error: aborting due to 8 previous errors
|
|
|