2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:44:5
2017-02-07 14:05:30 -06:00
|
2018-12-27 09:57:55 -06:00
LL | x + 0;
2022-06-04 06:34:07 -05:00
| ^^^^^ help: consider reducing it to: `x`
2017-02-07 14:05:30 -06:00
|
2018-08-01 09:30:44 -05:00
= note: `-D clippy::identity-op` implied by `-D warnings`
2023-08-01 07:02:21 -05:00
= help: to override `-D warnings` add `#[allow(clippy::identity_op)]`
2017-02-07 14:05:30 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:46:5
2017-02-07 14:05:30 -06:00
|
2018-12-27 09:57:55 -06:00
LL | x + (1 - 1);
2022-06-04 06:34:07 -05:00
| ^^^^^^^^^^^ help: consider reducing it to: `x`
2017-02-07 14:05:30 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:49:5
2017-02-07 14:05:30 -06:00
|
2018-12-27 09:57:55 -06:00
LL | 0 + x;
2022-06-04 06:34:07 -05:00
| ^^^^^ help: consider reducing it to: `x`
2017-02-07 14:05:30 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:53:5
2017-02-07 14:05:30 -06:00
|
2018-12-27 09:57:55 -06:00
LL | x | (0);
2022-06-04 06:34:07 -05:00
| ^^^^^^^ help: consider reducing it to: `x`
2017-02-07 14:05:30 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:57:5
2017-02-07 14:05:30 -06:00
|
2018-12-27 09:57:55 -06:00
LL | x * 1;
2022-06-04 06:34:07 -05:00
| ^^^^^ help: consider reducing it to: `x`
2017-02-07 14:05:30 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:59:5
2017-02-07 14:05:30 -06:00
|
2018-12-27 09:57:55 -06:00
LL | 1 * x;
2022-06-04 06:34:07 -05:00
| ^^^^^ help: consider reducing it to: `x`
2017-02-07 14:05:30 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:66:5
2017-02-07 14:05:30 -06:00
|
2018-12-27 09:57:55 -06:00
LL | -1 & x;
2022-06-04 06:34:07 -05:00
| ^^^^^^ help: consider reducing it to: `x`
2017-02-07 14:05:30 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:70:5
2017-09-30 03:33:15 -05:00
|
2018-12-27 09:57:55 -06:00
LL | u & 255;
2022-06-04 06:34:07 -05:00
| ^^^^^^^ help: consider reducing it to: `u`
2017-09-30 03:33:15 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:74:5
2020-05-17 10:36:26 -05:00
|
LL | 42 << 0;
2022-06-04 06:34:07 -05:00
| ^^^^^^^ help: consider reducing it to: `42`
2020-05-17 10:36:26 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:76:5
2020-05-17 10:36:26 -05:00
|
LL | 1 >> 0;
2022-06-04 06:34:07 -05:00
| ^^^^^^ help: consider reducing it to: `1`
2020-05-17 10:36:26 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:78:5
2020-05-17 10:36:26 -05:00
|
LL | 42 >> 0;
2022-06-04 06:34:07 -05:00
| ^^^^^^^ help: consider reducing it to: `42`
2020-05-17 10:36:26 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:80:5
2021-12-30 08:10:43 -06:00
|
LL | &x >> 0;
2022-12-17 07:12:54 -06:00
| ^^^^^^^ help: consider reducing it to: `x`
2021-12-30 08:10:43 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:82:5
2021-12-30 08:10:43 -06:00
|
LL | x >> &0;
2022-06-04 06:34:07 -05:00
| ^^^^^^^ help: consider reducing it to: `x`
2021-12-30 08:10:43 -06:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:90:5
2022-04-07 12:39:59 -05:00
|
LL | 2 % 3;
2022-06-04 06:34:07 -05:00
| ^^^^^ help: consider reducing it to: `2`
2022-04-07 12:39:59 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:92:5
2022-04-07 12:39:59 -05:00
|
LL | -2 % 3;
2022-06-04 06:34:07 -05:00
| ^^^^^^ help: consider reducing it to: `-2`
2022-04-07 12:39:59 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:94:5
2022-04-07 12:39:59 -05:00
|
LL | 2 % -3 + x;
2022-06-04 06:34:07 -05:00
| ^^^^^^ help: consider reducing it to: `2`
2022-04-07 12:39:59 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:96:5
2022-04-07 12:39:59 -05:00
|
LL | -2 % -3 + x;
2022-06-04 06:34:07 -05:00
| ^^^^^^^ help: consider reducing it to: `-2`
2022-04-07 12:39:59 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:98:9
2022-04-07 12:39:59 -05:00
|
LL | x + 1 % 3;
2022-06-04 06:34:07 -05:00
| ^^^^^ help: consider reducing it to: `1`
2022-04-07 12:39:59 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:107:5
2022-05-05 09:12:52 -05:00
|
LL | 0 + if b { 1 } else { 2 };
2022-06-04 06:34:07 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:109:5
2022-06-04 06:34:07 -05:00
|
LL | 0 + if b { 1 } else { 2 } + if b { 3 } else { 4 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:111:5
2022-05-05 09:12:52 -05:00
|
LL | 0 + match a { 0 => 10, _ => 20 };
2022-06-04 06:34:07 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:113:5
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 0 + match a { 0 => 10, _ => 20 } + match a { 0 => 30, _ => 40 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:115:5
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 0 + if b { 1 } else { 2 } + match a { 0 => 30, _ => 40 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:117:5
2022-06-04 06:34:07 -05:00
|
LL | 0 + match a { 0 => 10, _ => 20 } + if b { 3 } else { 4 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:119:5
2022-06-04 06:34:07 -05:00
|
LL | (if b { 1 } else { 2 }) + 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:122:5
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 0 + { a } + 3;
| ^^^^^^^^^ help: consider reducing it to: `({ a })`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:124:5
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 0 + { a } * 2;
| ^^^^^^^^^^^^^ help: consider reducing it to: `({ a } * 2)`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:126:5
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 0 + loop { let mut c = 0; if c == 10 { break c; } c += 1; } + { a * 2 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(loop { let mut c = 0; if c == 10 { break c; } c += 1; })`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:133:7
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | f(1 * a + { 8 * 5 });
| ^^^^^ help: consider reducing it to: `a`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:135:7
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | f(0 + if b { 1 } else { 2 } + 3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `if b { 1 } else { 2 }`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:138:20
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | const _: i32 = { 2 * 4 } + 0 + 3;
| ^^^^^^^^^^^^^ help: consider reducing it to: `{ 2 * 4 }`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:140:20
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | const _: i32 = 0 + { 1 + 2 * 3 } + 3;
| ^^^^^^^^^^^^^^^^^ help: consider reducing it to: `{ 1 + 2 * 3 }`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:143:5
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 0 + a as usize;
| ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:145:13
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | let _ = 0 + a as usize;
| ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:147:5
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 0 + { a } as usize;
| ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `({ a } as usize)`
2022-05-05 09:12:52 -05:00
2022-06-04 06:34:07 -05:00
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:150:9
2022-05-05 09:12:52 -05:00
|
2022-06-04 06:34:07 -05:00
LL | 2 * (0 + { a });
| ^^^^^^^^^^^ help: consider reducing it to: `{ a }`
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:152:5
2022-06-04 06:34:07 -05:00
|
LL | 1 * ({ a } + 4);
| ^^^^^^^^^^^^^^^ help: consider reducing it to: `(({ a } + 4))`
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:154:5
2022-06-04 06:34:07 -05:00
|
LL | 1 * 1;
| ^^^^^ help: consider reducing it to: `1`
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:159:18
2022-12-17 07:12:54 -06:00
|
LL | let _: i32 = &x + 0;
| ^^^^^^ help: consider reducing it to: `x`
error: this operation has no effect
2024-01-11 10:27:03 -06:00
--> $DIR/identity_op.rs:164:5
2022-06-04 06:34:07 -05:00
|
LL | 0 + if a { 1 } else { 2 } + if b { 3 } else { 5 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if a { 1 } else { 2 })`
2022-05-05 09:12:52 -05:00
2024-01-11 10:27:03 -06:00
error: this operation has no effect
--> $DIR/identity_op.rs:175:22
|
LL | let _: i32 = *x + 0;
| ^^^^^^ help: consider reducing it to: `*x`
error: this operation has no effect
--> $DIR/identity_op.rs:177:22
|
LL | let _: i32 = x + 0;
| ^^^^^ help: consider reducing it to: `*x`
error: this operation has no effect
--> $DIR/identity_op.rs:182:22
|
LL | let _: i32 = **x + 0;
| ^^^^^^^ help: consider reducing it to: `**x`
error: this operation has no effect
--> $DIR/identity_op.rs:185:22
|
LL | let _: i32 = *x + 0;
| ^^^^^^ help: consider reducing it to: `**x`
error: this operation has no effect
--> $DIR/identity_op.rs:191:22
|
LL | let _: i32 = ***x + 0;
| ^^^^^^^^ help: consider reducing it to: `***x`
error: this operation has no effect
--> $DIR/identity_op.rs:193:22
|
LL | let _: i32 = **x + 0;
| ^^^^^^^ help: consider reducing it to: `***x`
error: this operation has no effect
--> $DIR/identity_op.rs:196:22
|
LL | let _: i32 = *&x + 0;
| ^^^^^^^ help: consider reducing it to: `*&x`
error: this operation has no effect
--> $DIR/identity_op.rs:198:22
|
LL | let _: i32 = **&&x + 0;
| ^^^^^^^^^ help: consider reducing it to: `**&&x`
error: this operation has no effect
--> $DIR/identity_op.rs:200:22
|
LL | let _: i32 = *&*&x + 0;
| ^^^^^^^^^ help: consider reducing it to: `*&*&x`
error: this operation has no effect
--> $DIR/identity_op.rs:202:22
|
LL | let _: i32 = **&&*&x + 0;
| ^^^^^^^^^^^ help: consider reducing it to: `**&&*&x`
error: this operation has no effect
--> $DIR/identity_op.rs:209:22
|
LL | let _: i32 = **&&*&x + 0;
| ^^^^^^^^^^^ help: consider reducing it to: `***&&*&x`
error: this operation has no effect
--> $DIR/identity_op.rs:211:22
|
LL | let _: i32 = **&&*&x + 0;
| ^^^^^^^^^^^ help: consider reducing it to: `***&&*&x`
error: aborting due to 52 previous errors
2018-01-16 10:06:27 -06:00