11error: there is no need to manually implement bit rotation
2- --> tests/ui/manual_rotate.rs:8 :16
2+ --> tests/ui/manual_rotate.rs:9 :16
33 |
44LL | let y_u8 = (x_u8 >> 3) | (x_u8 << 5);
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u8.rotate_right(3)`
@@ -8,64 +8,70 @@ LL | let y_u8 = (x_u8 >> 3) | (x_u8 << 5);
88 = help: to override `-D warnings` add `#[allow(clippy::manual_rotate)]`
99
1010error: there is no need to manually implement bit rotation
11- --> tests/ui/manual_rotate.rs:10 :17
11+ --> tests/ui/manual_rotate.rs:11 :17
1212 |
1313LL | let y_u16 = (x_u16 >> 7) | (x_u16 << 9);
1414 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u16.rotate_right(7)`
1515
1616error: there is no need to manually implement bit rotation
17- --> tests/ui/manual_rotate.rs:12 :17
17+ --> tests/ui/manual_rotate.rs:13 :17
1818 |
1919LL | let y_u32 = (x_u32 >> 8) | (x_u32 << 24);
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u32.rotate_right(8)`
2121
2222error: there is no need to manually implement bit rotation
23- --> tests/ui/manual_rotate.rs:14 :17
23+ --> tests/ui/manual_rotate.rs:15 :17
2424 |
2525LL | let y_u64 = (x_u64 >> 9) | (x_u64 << 55);
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u64.rotate_right(9)`
2727
2828error: there is no need to manually implement bit rotation
29- --> tests/ui/manual_rotate.rs:16 :16
29+ --> tests/ui/manual_rotate.rs:17 :16
3030 |
3131LL | let y_i8 = (x_i8 >> 3) | (x_i8 << 5);
3232 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i8.rotate_right(3)`
3333
3434error: there is no need to manually implement bit rotation
35- --> tests/ui/manual_rotate.rs:18 :17
35+ --> tests/ui/manual_rotate.rs:19 :17
3636 |
3737LL | let y_i16 = (x_i16 >> 7) | (x_i16 << 9);
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i16.rotate_right(7)`
3939
4040error: there is no need to manually implement bit rotation
41- --> tests/ui/manual_rotate.rs:20 :17
41+ --> tests/ui/manual_rotate.rs:21 :17
4242 |
4343LL | let y_i32 = (x_i32 >> 8) | (x_i32 << 24);
4444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i32.rotate_right(8)`
4545
4646error: there is no need to manually implement bit rotation
47- --> tests/ui/manual_rotate.rs:22 :17
47+ --> tests/ui/manual_rotate.rs:23 :17
4848 |
4949LL | let y_i64 = (x_i64 >> 9) | (x_i64 << 55);
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i64.rotate_right(9)`
5151
5252error: there is no need to manually implement bit rotation
53- --> tests/ui/manual_rotate.rs:25 :22
53+ --> tests/ui/manual_rotate.rs:26 :22
5454 |
5555LL | let y_u32_plus = (x_u32 >> 8) + (x_u32 << 24);
5656 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u32.rotate_right(8)`
5757
5858error: there is no need to manually implement bit rotation
59- --> tests/ui/manual_rotate.rs:28 :25
59+ --> tests/ui/manual_rotate.rs:29 :25
6060 |
6161LL | let y_u32_complex = ((x_u32 | 3256) >> 8) | ((x_u32 | 3256) << 24);
6262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(x_u32 | 3256).rotate_right(8)`
6363
6464error: there is no need to manually implement bit rotation
65- --> tests/ui/manual_rotate.rs:30 :20
65+ --> tests/ui/manual_rotate.rs:31 :20
6666 |
6767LL | let y_u64_as = (x_u32 as u64 >> 8) | ((x_u32 as u64) << 56);
6868 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(x_u32 as u64).rotate_right(8)`
6969
70- error: aborting due to 11 previous errors
70+ error: there is no need to manually implement bit rotation
71+ --> tests/ui/manual_rotate.rs:34:13
72+ |
73+ LL | let _ = (x_i64 >> N) | (x_i64 << (64 - N));
74+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i64.rotate_right(N)`
75+
76+ error: aborting due to 12 previous errors
7177
0 commit comments