Explorar o código

fix CTFE cycle

Aaron Kutch %!s(int64=4) %!d(string=hai) anos
pai
achega
3231cee4ad
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/int/mod.rs

+ 1 - 1
src/int/mod.rs

@@ -84,7 +84,7 @@ pub trait Int:
 
 macro_rules! int_impl_common {
     ($ty:ty) => {
-        const BITS: u32 = <Self>::BITS;
+        const BITS: u32 = <Self as Int>::ZERO.count_zeros();
         const SIGNED: bool = Self::MIN != Self::ZERO;
 
         const ZERO: Self = 0;