浏览代码

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;