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
44
45
46
// SPDX-License-Identifier: Apache-2.0
//! This crate provides the `SignRel` trait which maps relationships between
//! integers that only differ by signedness. For example, both `a` and `b` in
//! this example have the type `usize`:
//!
//! ```rust
//! use signrel::SignRel;
//!
//! let a: <isize as SignRel>::Unsigned = 17;
//! let b: <usize as SignRel>::Unsigned = 17;
//!
//! assert_eq!(17usize, a);
//! assert_eq!(17usize, b);
//! ```
/// The relationship between integers differing only by signedness
sr_impl!