1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use Any;
use crate;
/// The largest unsigned integer usable by counters provided by this crate.
///
/// If `usize > u64`, this is a type alias to `usize`. Otherwise, it is a type
/// alias to `u64`.
pub type MaxCountUInt = Usize64;
/// `u8`-`u64` and `usize`.
///
/// We deliberately do not implement this trait for `u128` to make it
/// impossible† to overflow `u128` when summing counts for averaging.
///
/// †When `usize` is larger than `u64`, it becomes possible to overflow `u128`.
/// In this case, Divan assumes
// These types must be losslessly convertible to `MaxCountUInt`.
impl_uint!;