1
1
error: 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
3
3
|
4
4
LL | let y_u8 = (x_u8 >> 3) | (x_u8 << 5);
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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);
8
8
= help: to override `-D warnings` add `#[allow(clippy::manual_rotate)]`
9
9
10
10
error: 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
12
12
|
13
13
LL | let y_u16 = (x_u16 >> 7) | (x_u16 << 9);
14
14
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u16.rotate_right(7)`
15
15
16
16
error: 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
18
18
|
19
19
LL | let y_u32 = (x_u32 >> 8) | (x_u32 << 24);
20
20
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u32.rotate_right(8)`
21
21
22
22
error: 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
24
24
|
25
25
LL | let y_u64 = (x_u64 >> 9) | (x_u64 << 55);
26
26
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u64.rotate_right(9)`
27
27
28
28
error: 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
30
30
|
31
31
LL | let y_i8 = (x_i8 >> 3) | (x_i8 << 5);
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i8.rotate_right(3)`
33
33
34
34
error: 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
36
36
|
37
37
LL | let y_i16 = (x_i16 >> 7) | (x_i16 << 9);
38
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i16.rotate_right(7)`
39
39
40
40
error: 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
42
42
|
43
43
LL | let y_i32 = (x_i32 >> 8) | (x_i32 << 24);
44
44
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i32.rotate_right(8)`
45
45
46
46
error: 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
48
48
|
49
49
LL | let y_i64 = (x_i64 >> 9) | (x_i64 << 55);
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_i64.rotate_right(9)`
51
51
52
52
error: 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
54
54
|
55
55
LL | let y_u32_plus = (x_u32 >> 8) + (x_u32 << 24);
56
56
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `x_u32.rotate_right(8)`
57
57
58
58
error: 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
60
60
|
61
61
LL | let y_u32_complex = ((x_u32 | 3256) >> 8) | ((x_u32 | 3256) << 24);
62
62
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(x_u32 | 3256).rotate_right(8)`
63
63
64
64
error: 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
66
66
|
67
67
LL | let y_u64_as = (x_u32 as u64 >> 8) | ((x_u32 as u64) << 56);
68
68
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(x_u32 as u64).rotate_right(8)`
69
69
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
71
77
0 commit comments