Returns the size (in bits) of a given type.
(ty: Type)
| 5 | |
| 6 | /// Returns the size (in bits) of a given type. |
| 7 | pub fn ty_bits(ty: Type) -> usize { |
| 8 | ty.bits() as usize |
| 9 | } |
| 10 | |
| 11 | /// Align a size up to a power-of-two alignment. |
| 12 | pub(crate) fn align_to<N>(x: N, alignment: N) -> N |
no test coverage detected