rust/src/libcore
bors 00f9ff2b41 auto merge of #15324 : sneves/rust/master, r=alexcrichton
The current implementation of `rotate_left` and `rotate_right` are incorrect when the rotation amount is 0, or a multiple of the input's bitsize. When `n = 0`, the expression

    (self >> n) | (self << ($BITS - n))

results in a shift left by `$BITS` bits, which is undefined behavior (see https://github.com/rust-lang/rust/issues/10183), and currently results in a hardcoded `-1` value, instead of the original input value. Reducing `($BITS - n)` modulo `$BITS`, simplified to `(-n % $BITS)`, fixes this problem.
2014-07-03 06:11:38 +00:00
..
fmt Add impl Show for &Show 2014-06-30 12:33:37 -07:00
num Fix rotate_{left, right} for multiple of bitsize rotation amounts 2014-07-02 23:45:27 +01:00
any.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
atomics.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
bool.rs Move core::bool tests to run-pass 2014-06-24 17:22:59 -07:00
cell.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
char.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
clone.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
cmp.rs Implement RFC#28: Add PartialOrd::partial_cmp 2014-06-29 21:42:09 -07:00
collections.rs core: Move the collections traits to libcollections 2014-06-09 00:38:46 -07:00
default.rs rustc: Update how Gc<T> is recognized 2014-06-11 09:11:40 -07:00
failure.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
finally.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
intrinsics.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
iter.rs Implement RFC#28: Add PartialOrd::partial_cmp 2014-06-29 21:42:09 -07:00
kinds.rs Rename all raw pointers as necessary 2014-06-28 11:53:58 -07:00
lib.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
macros.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
mem.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
ops.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
option.rs auto merge of #15256 : erickt/rust/optimizations, r=alexcrichton 2014-06-30 03:46:25 +00:00
prelude.rs core: Rename container mod to collections. Closes #12543 2014-06-08 21:29:57 -07:00
ptr.rs Implement RFC#28: Add PartialOrd::partial_cmp 2014-06-29 21:42:09 -07:00
raw.rs Extract tests from libcore to a separate crate 2014-06-29 15:57:21 -07:00
result.rs auto merge of #15256 : erickt/rust/optimizations, r=alexcrichton 2014-06-30 03:46:25 +00:00
should_not_exist.rs core: Rename container mod to collections. Closes #12543 2014-06-08 21:29:57 -07:00
simd.rs Fix spelling errors in comments. 2014-06-08 13:39:42 -04:00
slice.rs core: Remove the unnecessary 'traits' module from 'slice' 2014-06-30 15:44:36 -07:00
str.rs rustc: Remove &str indexing from the language. 2014-07-01 19:12:29 -07:00
tuple.rs Implement RFC#28: Add PartialOrd::partial_cmp 2014-06-29 21:42:09 -07:00
ty.rs Rename all raw pointers as necessary 2014-06-28 11:53:58 -07:00
unicode.rs lib{std,core,debug,rustuv,collections,native,regex}: Fix snake_case errors. 2014-05-30 17:55:41 +01:00