1 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
2 --> $DIR/manual_bits.rs:15:5
4 LL | size_of::<i8>() * 8;
5 | ^^^^^^^^^^^^^^^^^^^ help: consider using: `i8::BITS as usize`
7 = note: `-D clippy::manual-bits` implied by `-D warnings`
9 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
10 --> $DIR/manual_bits.rs:16:5
12 LL | size_of::<i16>() * 8;
13 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i16::BITS as usize`
15 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
16 --> $DIR/manual_bits.rs:17:5
18 LL | size_of::<i32>() * 8;
19 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i32::BITS as usize`
21 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
22 --> $DIR/manual_bits.rs:18:5
24 LL | size_of::<i64>() * 8;
25 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i64::BITS as usize`
27 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
28 --> $DIR/manual_bits.rs:19:5
30 LL | size_of::<i128>() * 8;
31 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `i128::BITS as usize`
33 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
34 --> $DIR/manual_bits.rs:20:5
36 LL | size_of::<isize>() * 8;
37 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `isize::BITS as usize`
39 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
40 --> $DIR/manual_bits.rs:22:5
42 LL | size_of::<u8>() * 8;
43 | ^^^^^^^^^^^^^^^^^^^ help: consider using: `u8::BITS as usize`
45 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
46 --> $DIR/manual_bits.rs:23:5
48 LL | size_of::<u16>() * 8;
49 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u16::BITS as usize`
51 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
52 --> $DIR/manual_bits.rs:24:5
54 LL | size_of::<u32>() * 8;
55 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize`
57 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
58 --> $DIR/manual_bits.rs:25:5
60 LL | size_of::<u64>() * 8;
61 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u64::BITS as usize`
63 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
64 --> $DIR/manual_bits.rs:26:5
66 LL | size_of::<u128>() * 8;
67 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS as usize`
69 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
70 --> $DIR/manual_bits.rs:27:5
72 LL | size_of::<usize>() * 8;
73 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `usize::BITS as usize`
75 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
76 --> $DIR/manual_bits.rs:29:5
78 LL | 8 * size_of::<i8>();
79 | ^^^^^^^^^^^^^^^^^^^ help: consider using: `i8::BITS as usize`
81 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
82 --> $DIR/manual_bits.rs:30:5
84 LL | 8 * size_of::<i16>();
85 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i16::BITS as usize`
87 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
88 --> $DIR/manual_bits.rs:31:5
90 LL | 8 * size_of::<i32>();
91 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i32::BITS as usize`
93 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
94 --> $DIR/manual_bits.rs:32:5
96 LL | 8 * size_of::<i64>();
97 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i64::BITS as usize`
99 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
100 --> $DIR/manual_bits.rs:33:5
102 LL | 8 * size_of::<i128>();
103 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `i128::BITS as usize`
105 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
106 --> $DIR/manual_bits.rs:34:5
108 LL | 8 * size_of::<isize>();
109 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `isize::BITS as usize`
111 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
112 --> $DIR/manual_bits.rs:36:5
114 LL | 8 * size_of::<u8>();
115 | ^^^^^^^^^^^^^^^^^^^ help: consider using: `u8::BITS as usize`
117 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
118 --> $DIR/manual_bits.rs:37:5
120 LL | 8 * size_of::<u16>();
121 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u16::BITS as usize`
123 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
124 --> $DIR/manual_bits.rs:38:5
126 LL | 8 * size_of::<u32>();
127 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize`
129 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
130 --> $DIR/manual_bits.rs:39:5
132 LL | 8 * size_of::<u64>();
133 | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u64::BITS as usize`
135 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
136 --> $DIR/manual_bits.rs:40:5
138 LL | 8 * size_of::<u128>();
139 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS as usize`
141 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
142 --> $DIR/manual_bits.rs:41:5
144 LL | 8 * size_of::<usize>();
145 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `usize::BITS as usize`
147 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
148 --> $DIR/manual_bits.rs:51:5
150 LL | size_of::<Word>() * 8;
151 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `Word::BITS as usize`
153 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
154 --> $DIR/manual_bits.rs:55:18
156 LL | let _: u32 = (size_of::<u128>() * 8) as u32;
157 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS`
159 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
160 --> $DIR/manual_bits.rs:56:18
162 LL | let _: u32 = (size_of::<u128>() * 8).try_into().unwrap();
163 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS`
165 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
166 --> $DIR/manual_bits.rs:57:13
168 LL | let _ = (size_of::<u128>() * 8).pow(5);
169 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(u128::BITS as usize)`
171 error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
172 --> $DIR/manual_bits.rs:58:14
174 LL | let _ = &(size_of::<u128>() * 8);
175 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(u128::BITS as usize)`
177 error: aborting due to 29 previous errors