Lines Matching refs:fits_within
29 macro_rules! fits_within {
43 fn fits_within<T: Integer>(value: T, num_bits: u32) -> bool {
44 fits_within!(value, T, num_bits)
269 const_assert!(fits_within!(VALUE, $type, N));
271 // SAFETY: `fits_within` confirmed that `VALUE` can be represented within
282 fits_within!(value, $type, N),
354 fits_within(value, N).then(|| {
355 // SAFETY: `fits_within` confirmed that `value` can be represented within `N` bits.
394 fits_within(expr, N),
398 // SAFETY: `fits_within` confirmed that `expr` can be represented within `N` bits.
583 if !fits_within(self.0, N) {
584 // SAFETY: Per the `Bounded` invariants, `fits_within` can never return `false` on the