Function core::intrinsics::unchecked_rem [−][src]
pub unsafe extern "rust-intrinsic" fn unchecked_rem<T: Copy>(x: T, y: T) -> T
🔬 This is a nightly-only experimental API. (core_intrinsics
)
intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
Expand description
返回未经检查的除法的其余部分,从而在 y == 0
或 x == T::MIN && y == -1
时导致未定义的行为
可通过 checked_rem
方法在整数基元上使用此内联函数的安全包装。
例如,
u32::checked_rem