Auto merge of #147784 - nxsaken:div_exact_return_option, r=dtolnay

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`.
This commit is contained in:
bors 2025-11-02 08:05:11 +00:00
commit cabc77db72

Diff Content Not Available