about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorJim Turner <git@turner.link>2021-03-01 16:19:59 -0500
committerJim Turner <git@turner.link>2021-03-01 17:13:50 -0500
commitb45855032b3aad0ea0a48894f56cb9bb8fa361f2 (patch)
tree787d01b3aafea6ee0dbb55ede16ef5b75581c48b /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent9278b4c67284db95990673f26934b9d1d5af2e77 (diff)
downloadrust-b45855032b3aad0ea0a48894f56cb9bb8fa361f2.tar.gz
rust-b45855032b3aad0ea0a48894f56cb9bb8fa361f2.zip
Document panicking cases for integer remainder
The panic when the right operand is `0` is expected, but the
overflow-related panic (which occurs only for `MIN % -1`) is somewhat
surprising for two reasons: a return value of `0` would be reasonable
in this case, and, for most arithmetic operations, overflow results in
panic only when `debug_assertions` is enabled. As a result, it's
helpful to document this behavior.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions