1
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
1
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
2
2
--> tests/ui/manual_bits.rs:14:5
3
3
|
4
4
LL | size_of::<i8>() * 8;
@@ -7,169 +7,169 @@ LL | size_of::<i8>() * 8;
7
7
= note: `-D clippy::manual-bits` implied by `-D warnings`
8
8
= help: to override `-D warnings` add `#[allow(clippy::manual_bits)]`
9
9
10
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
10
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
11
11
--> tests/ui/manual_bits.rs:16:5
12
12
|
13
13
LL | size_of::<i16>() * 8;
14
14
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i16::BITS as usize`
15
15
16
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
16
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
17
17
--> tests/ui/manual_bits.rs:18:5
18
18
|
19
19
LL | size_of::<i32>() * 8;
20
20
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i32::BITS as usize`
21
21
22
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
22
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
23
23
--> tests/ui/manual_bits.rs:20:5
24
24
|
25
25
LL | size_of::<i64>() * 8;
26
26
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i64::BITS as usize`
27
27
28
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
28
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
29
29
--> tests/ui/manual_bits.rs:22:5
30
30
|
31
31
LL | size_of::<i128>() * 8;
32
32
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `i128::BITS as usize`
33
33
34
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
34
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
35
35
--> tests/ui/manual_bits.rs:24:5
36
36
|
37
37
LL | size_of::<isize>() * 8;
38
38
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `isize::BITS as usize`
39
39
40
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
40
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
41
41
--> tests/ui/manual_bits.rs:27:5
42
42
|
43
43
LL | size_of::<u8>() * 8;
44
44
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `u8::BITS as usize`
45
45
46
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
46
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
47
47
--> tests/ui/manual_bits.rs:29:5
48
48
|
49
49
LL | size_of::<u16>() * 8;
50
50
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u16::BITS as usize`
51
51
52
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
52
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
53
53
--> tests/ui/manual_bits.rs:31:5
54
54
|
55
55
LL | size_of::<u32>() * 8;
56
56
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize`
57
57
58
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
58
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
59
59
--> tests/ui/manual_bits.rs:33:5
60
60
|
61
61
LL | size_of::<u64>() * 8;
62
62
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u64::BITS as usize`
63
63
64
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
64
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
65
65
--> tests/ui/manual_bits.rs:35:5
66
66
|
67
67
LL | size_of::<u128>() * 8;
68
68
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS as usize`
69
69
70
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
70
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
71
71
--> tests/ui/manual_bits.rs:37:5
72
72
|
73
73
LL | size_of::<usize>() * 8;
74
74
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `usize::BITS as usize`
75
75
76
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
76
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
77
77
--> tests/ui/manual_bits.rs:40:5
78
78
|
79
79
LL | 8 * size_of::<i8>();
80
80
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `i8::BITS as usize`
81
81
82
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
82
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
83
83
--> tests/ui/manual_bits.rs:42:5
84
84
|
85
85
LL | 8 * size_of::<i16>();
86
86
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i16::BITS as usize`
87
87
88
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
88
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
89
89
--> tests/ui/manual_bits.rs:44:5
90
90
|
91
91
LL | 8 * size_of::<i32>();
92
92
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i32::BITS as usize`
93
93
94
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
94
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
95
95
--> tests/ui/manual_bits.rs:46:5
96
96
|
97
97
LL | 8 * size_of::<i64>();
98
98
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i64::BITS as usize`
99
99
100
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
100
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
101
101
--> tests/ui/manual_bits.rs:48:5
102
102
|
103
103
LL | 8 * size_of::<i128>();
104
104
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `i128::BITS as usize`
105
105
106
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
106
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
107
107
--> tests/ui/manual_bits.rs:50:5
108
108
|
109
109
LL | 8 * size_of::<isize>();
110
110
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `isize::BITS as usize`
111
111
112
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
112
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
113
113
--> tests/ui/manual_bits.rs:53:5
114
114
|
115
115
LL | 8 * size_of::<u8>();
116
116
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `u8::BITS as usize`
117
117
118
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
118
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
119
119
--> tests/ui/manual_bits.rs:55:5
120
120
|
121
121
LL | 8 * size_of::<u16>();
122
122
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u16::BITS as usize`
123
123
124
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
124
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
125
125
--> tests/ui/manual_bits.rs:57:5
126
126
|
127
127
LL | 8 * size_of::<u32>();
128
128
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize`
129
129
130
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
130
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
131
131
--> tests/ui/manual_bits.rs:59:5
132
132
|
133
133
LL | 8 * size_of::<u64>();
134
134
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u64::BITS as usize`
135
135
136
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
136
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
137
137
--> tests/ui/manual_bits.rs:61:5
138
138
|
139
139
LL | 8 * size_of::<u128>();
140
140
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS as usize`
141
141
142
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
142
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
143
143
--> tests/ui/manual_bits.rs:63:5
144
144
|
145
145
LL | 8 * size_of::<usize>();
146
146
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `usize::BITS as usize`
147
147
148
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
148
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
149
149
--> tests/ui/manual_bits.rs:74:5
150
150
|
151
151
LL | size_of::<Word>() * 8;
152
152
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `Word::BITS as usize`
153
153
154
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
154
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
155
155
--> tests/ui/manual_bits.rs:79:18
156
156
|
157
157
LL | let _: u32 = (size_of::<u128>() * 8) as u32;
158
158
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS`
159
159
160
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
160
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
161
161
--> tests/ui/manual_bits.rs:81:18
162
162
|
163
163
LL | let _: u32 = (size_of::<u128>() * 8).try_into().unwrap();
164
164
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS`
165
165
166
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
166
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
167
167
--> tests/ui/manual_bits.rs:83:13
168
168
|
169
169
LL | let _ = (size_of::<u128>() * 8).pow(5);
170
170
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(u128::BITS as usize)`
171
171
172
- error: usage of `mem:: size_of::<T>()` to obtain the size of `T` in bits
172
+ error: usage of `size_of::<T>()` to obtain the size of `T` in bits
173
173
--> tests/ui/manual_bits.rs:85:14
174
174
|
175
175
LL | let _ = &(size_of::<u128>() * 8);
0 commit comments