-
Notifications
You must be signed in to change notification settings - Fork 88
/
asserts.rs
41 lines (30 loc) · 1.1 KB
/
asserts.rs
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
//! Static assertions.
use tests::*;
assert_impl!(arguments; Arguments<Q<Z0, Z0, Z0>, meter>,
Clone, Copy);
assert_impl!(display_style; ::fmt::DisplayStyle,
Clone, Copy);
storage_types! {
types: Float;
use tests::*;
assert_impl!(q; Quantity<Q<Z0, Z0, Z0>, U<V>, V>,
Clone, Copy, PartialEq, PartialOrd, Send, Sync);
assert_impl!(quantity_arguments; QuantityArguments<Q<Z0, Z0, Z0>, U<V>, V, meter>,
Clone, Copy);
}
storage_types! {
types: PrimInt, Rational, Rational32, Rational64;
use tests::*;
assert_impl!(q; Quantity<Q<Z0, Z0, Z0>, U<V>, V>,
Clone, Copy, Eq, Ord, PartialEq, PartialOrd, Send, Sync, ::lib::hash::Hash);
assert_impl!(quantity_arguments; QuantityArguments<Q<Z0, Z0, Z0>, U<V>, V, meter>,
Clone, Copy);
}
storage_types! {
types: BigInt, BigUint, BigRational;
use tests::*;
assert_impl!(q; Quantity<Q<Z0, Z0, Z0>, U<V>, V>,
Clone, Eq, Ord, PartialEq, PartialOrd, Send, Sync, ::lib::hash::Hash);
assert_impl!(quantity_arguments; QuantityArguments<Q<Z0, Z0, Z0>, U<V>, V, meter>,
Clone, Copy);
}