mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-18 02:38:28 +00:00
154 lines
5.1 KiB
Text
154 lines
5.1 KiB
Text
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:9:5
|
|
|
|
|
LL | size_of::<i8>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `i8::BITS`
|
|
|
|
|
= note: `-D clippy::manual-bits` implied by `-D warnings`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:10:5
|
|
|
|
|
LL | size_of::<i16>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i16::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:11:5
|
|
|
|
|
LL | size_of::<i32>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i32::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:12:5
|
|
|
|
|
LL | size_of::<i64>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i64::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:13:5
|
|
|
|
|
LL | size_of::<i128>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `i128::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:14:5
|
|
|
|
|
LL | size_of::<isize>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `isize::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:16:5
|
|
|
|
|
LL | size_of::<u8>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `u8::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:17:5
|
|
|
|
|
LL | size_of::<u16>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u16::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:18:5
|
|
|
|
|
LL | size_of::<u32>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:19:5
|
|
|
|
|
LL | size_of::<u64>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u64::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:20:5
|
|
|
|
|
LL | size_of::<u128>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:21:5
|
|
|
|
|
LL | size_of::<usize>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `usize::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:23:5
|
|
|
|
|
LL | 8 * size_of::<i8>();
|
|
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `i8::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:24:5
|
|
|
|
|
LL | 8 * size_of::<i16>();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i16::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:25:5
|
|
|
|
|
LL | 8 * size_of::<i32>();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i32::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:26:5
|
|
|
|
|
LL | 8 * size_of::<i64>();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `i64::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:27:5
|
|
|
|
|
LL | 8 * size_of::<i128>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `i128::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:28:5
|
|
|
|
|
LL | 8 * size_of::<isize>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `isize::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:30:5
|
|
|
|
|
LL | 8 * size_of::<u8>();
|
|
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `u8::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:31:5
|
|
|
|
|
LL | 8 * size_of::<u16>();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u16::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:32:5
|
|
|
|
|
LL | 8 * size_of::<u32>();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:33:5
|
|
|
|
|
LL | 8 * size_of::<u64>();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u64::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:34:5
|
|
|
|
|
LL | 8 * size_of::<u128>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `u128::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:35:5
|
|
|
|
|
LL | 8 * size_of::<usize>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `usize::BITS`
|
|
|
|
error: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits
|
|
--> $DIR/manual_bits.rs:45:5
|
|
|
|
|
LL | size_of::<Word>() * 8;
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `Word::BITS`
|
|
|
|
error: aborting due to 25 previous errors
|
|
|