mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-27 16:07:46 +00:00
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:
commit
cabc77db72