mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
73e6c9ebd9
Return `Option` from `exact_div` and inherit overflow checks According to https://github.com/rust-lang/rust/issues/139911#issuecomment-3404056127, `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release). rust-lang/rust#147771 should rename `exact_div` to `div_exact`.