about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-22 07:56:42 +0100
committerGitHub <noreply@github.com>2024-01-22 07:56:42 +0100
commit7d7c2257d3670d3e0b1226449e5640446a11db17 (patch)
treeb44ca0b56596e01f05adabe53b2722b7619f9283 /compiler/rustc_codegen_llvm/src
parent72dddeaeb78ff5bc95891f7846e4d360ebadc5fa (diff)
parent76659ae74324d52627a6911ca27e5ef02f3e79ef (diff)
downloadrust-7d7c2257d3670d3e0b1226449e5640446a11db17.tar.gz
rust-7d7c2257d3670d3e0b1226449e5640446a11db17.zip
Rollup merge of #119726 - NCGThompson:div-overflow-doc, r=Nilstrieb
Tweak Library Integer Division Docs

Improved the documentation and diagnostics related to panicking in the division-like methods in std:

* For signed methods that can overflow, clarified "results in overflow" to "self is -1 and rhs is Self::MIN." This is more concise than saying "results in overflow" and then explaining how it could overflow.
* For floor/ceil_div, corrected the documentation and made it more like the documentation in other methods.
* For signed methods that can overflow, explicitly mention that they are not affected by compiler flags.
* Removed all unused rustc_inherit_overflow_checks attributes. The non-division-like operations will never overflow.
* Added track_caller attributes to all methods that can panic. The panic messages will always be correct. For example, division methods all have / before %.
* Edited the saturating_div documentation to be consistent with similar methods.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions