Use T::BITS
instead of size_of::<T> * 8
.
This commit is contained in:
parent
5c30a16fa0
commit
1e2dba1e7c
17 changed files with 44 additions and 64 deletions
|
@ -14,6 +14,7 @@
|
|||
#![feature(generators)]
|
||||
#![feature(generator_trait)]
|
||||
#![feature(fn_traits)]
|
||||
#![feature(int_bits_const)]
|
||||
#![feature(min_specialization)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(nll)]
|
||||
|
|
|
@ -48,7 +48,7 @@ where
|
|||
P: Pointer,
|
||||
T: Tag,
|
||||
{
|
||||
const TAG_BIT_SHIFT: usize = (8 * std::mem::size_of::<usize>()) - T::BITS;
|
||||
const TAG_BIT_SHIFT: usize = usize::BITS as usize - T::BITS;
|
||||
const ASSERTION: () = {
|
||||
assert!(T::BITS <= P::BITS);
|
||||
// Used for the transmute_copy's below
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue