rust/src/libcore
kennytm d9d5c667d8 Rollup merge of #46947 - tspiteri:checked-div-rem-none, r=frewsxcv
doc: improve None condition doc for `checked_div` and `checked_rem`

This commit improves the condition mentioned in the docs for which `checked_div` and `checked_rem` return `None`.

For signed division, the commit changes "the operation results in overflow" to "the division results in overflow", otherwise there is room for misinterpretation for `checked_rem`: Without considering overflow, `MIN % -1` would be simply zero, allowing the misinterpretation that "the operation" does not result in overflow in this case. This ambiguity is removed using "when the division results in overflow".

For unsigned division, the condition for `None` should be simply when `rhs == 0`, as no other overflow is possible.
2018-01-07 02:36:01 +08:00
..
benches Auto merge of #45595 - scottmcm:iter-try-fold, r=dtolnay 2017-11-17 07:43:08 +00:00
fmt Rollup merge of #46831 - Diggsey:float-debug-fmt, r=dtolnay 2017-12-20 21:21:59 +08:00
hash Fix broken link markup in Hasher::finish docs 2017-11-10 20:58:03 +01:00
iter doc: a better example 2017-12-15 02:07:12 +02:00
num Rollup merge of #46947 - tspiteri:checked-div-rem-none, r=frewsxcv 2018-01-07 02:36:01 +08:00
ops Use a better link for method resolution in Deref docs 2017-12-09 13:50:07 +00:00
prelude Run rustfmt on libcore/prelude folder 2016-10-16 22:13:04 +05:30
slice Fix potential overflow in TrustedRandomAccess impl for slice::{Chunks,ChunksMut} 2018-01-04 11:34:05 +02:00
str Rollup merge of #47030 - ollie27:stab, r=alexcrichton 2018-01-05 17:22:04 +08:00
sync Correct a few stability attributes 2017-12-27 14:11:05 +00:00
tests Add unit test for zipping slice::{Chunks, ChunksMut, Windows} iterators 2018-01-03 15:05:18 +02:00
any.rs Various fixes to wording consistency in the docs 2017-03-22 17:19:52 +01:00
array.rs Pass formatter in TryFromSliceError Display impl 2017-09-29 11:26:19 -04:00
borrow.rs Update older URLs pointing to the first edition of the Book 2017-06-15 00:04:00 +09:00
Cargo.toml std: Add a new wasm32-unknown-unknown target 2017-11-19 21:07:41 -08:00
cell.rs Rollup merge of #46517 - notriddle:patch-2, r=BurntSushi 2017-12-20 21:21:51 +08:00
char.rs std: Stabilize char_escape_debug 2017-07-25 07:09:31 -07:00
char_private.rs regenerate libcore/char_private.rs 2017-10-26 22:32:24 -07:00
clone.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00
cmp.rs Rename never_type_impls gate to never_type 2017-12-12 14:03:03 +08:00
convert.rs Simplify implementation of Display and Error for convert::Infallible. 2017-09-23 17:27:02 -07:00
default.rs Fix "Quasi-quoting is inefficient" warning in incremental rustbuild. 2017-07-18 01:49:40 +08:00
internal_macros.rs fix version number 2017-09-21 15:46:17 -04:00
intrinsics.rs Bump to 1.25.0 2018-01-04 07:21:22 -08:00
iter_private.rs Various fixes to wording consistency in the docs 2017-03-22 17:19:52 +01:00
lib.rs Update bootstrap compiler 2017-11-29 21:11:20 -08:00
macros.rs Make examples equivalent 2018-01-04 15:55:01 +02:00
marker.rs Update bootstrap compiler 2017-11-29 21:11:20 -08:00
mem.rs Correct a few stability attributes 2017-12-27 14:11:05 +00:00
nonzero.rs Rollup merge of #46287 - SimonSapin:stable-constness, r=aturon 2017-11-29 18:37:47 +08:00
option.rs Rollup merge of #46548 - jonathanstrong:master, r=dtolnay 2017-12-07 23:59:04 +01:00
panicking.rs Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
ptr.rs Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1 2017-12-25 04:55:57 +00:00
raw.rs Fix up various links 2017-03-20 10:10:16 -04:00
result.rs Rollup merge of #46548 - jonathanstrong:master, r=dtolnay 2017-12-07 23:59:04 +01:00
tuple.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00
unit.rs impl FromIterator<()> for () 2017-10-18 23:12:37 -07:00