소스 검색

fix CTFE cycle

Aaron Kutch 4 년 전
부모
커밋
3231cee4ad
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;