rust/src/libstd
bors 770b2fea06 auto merge of #13468 : alexcrichton/rust/issue-13467, r=thestinger
Previously, all slices derived from a vector whose values were of size 0 had a
null pointer as the 'data' pointer on the slice. This caused first pointer to be
yielded during iteration to always be the null pointer. Due to the null pointer
optimization, this meant that the first return value was None, instead of
Some(&T).

This commit changes slice construction from a Vec instance to use a base pointer
of 1 if the values have zero size. This means that the iterator will never
return null, and the iteration will proceed appropriately.

Closes #13467
2014-04-13 04:06:53 -07:00
..
comm std: Make std::comm return types consistent 2014-04-10 21:41:19 -07:00
fmt auto merge of #13458 : huonw/rust/doc-signatures, r=alexcrichton 2014-04-11 12:01:44 -07:00
hash libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
io auto merge of #13448 : alexcrichton/rust/rework-chan-return-values, r=brson 2014-04-12 12:21:58 -07:00
num libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
path auto merge of #13395 : Ryman/rust/bytecontainer_impl_container, r=alexcrichton 2014-04-11 13:46:45 -07:00
rt auto merge of #13448 : alexcrichton/rust/rework-chan-return-values, r=brson 2014-04-12 12:21:58 -07:00
sync Add more type signatures to the docs; tweak a few of them. 2014-04-11 23:10:22 +10:00
unstable Add more type signatures to the docs; tweak a few of them. 2014-04-11 23:10:22 +10:00
any.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
ascii.rs Fix fallout of requiring uint indices 2014-04-02 15:56:31 -07:00
bool.rs std: Change assert_eq!() to use {} instead of {:?} 2014-02-28 23:01:54 -08:00
c_str.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
c_vec.rs Register new snapshots 2014-04-08 00:03:11 -07:00
cast.rs Remove std::cast::transmute_immut_unsafe 2014-03-19 16:15:22 +01:00
cell.rs Stop using transmute_mut in RefCell 2014-04-10 15:21:59 -07:00
char.rs libstd: Implement StrBuf, a new string buffer type like Vec, and 2014-04-10 22:10:10 +10:00
cleanup.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
clone.rs Made the clone_from implementation for ~T reuse the T itself if 2014-03-18 16:29:57 -07:00
cmp.rs Remove use of block comments in src/libstd/cmp.rs 2014-04-06 16:21:36 +02:00
container.rs std: uniform modules titles for doc 2013-12-27 09:49:11 +01:00
default.rs libstd: Remove all support code related to @mut 2014-01-03 14:02:00 -08:00
from_str.rs std: uniform modules titles for doc 2013-12-27 09:49:11 +01:00
gc.rs std: Switch field privacy as necessary 2014-03-31 15:17:12 -07:00
intrinsics.rs rustc: remove ty_unboxed_vec. 2014-04-06 14:05:32 +03:00
iter.rs Register new snapshots 2014-04-08 00:03:11 -07:00
kinds.rs std: Switch field privacy as necessary 2014-03-31 15:17:12 -07:00
lib.rs libstd: Implement StrBuf, a new string buffer type like Vec, and 2014-04-10 22:10:10 +10:00
local_data.rs std,serialize: remove some internal uses of ~[]. 2014-04-10 15:21:58 -07:00
macros.rs std: use a match in assert_eq! to extend the lifetime of the args. 2014-04-09 09:57:49 +10:00
managed.rs std: remove the equals method from TotalEq. 2014-03-23 23:48:10 +11:00
mem.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
ops.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
option.rs std: Remove RefCell::set() 2014-04-03 20:28:59 -07:00
os.rs Fix fallout from std::libc separation 2014-04-04 09:31:44 -07:00
owned.rs std: remove the equals method from TotalEq. 2014-03-23 23:48:10 +11:00
prelude.rs libstd: Implement StrBuf, a new string buffer type like Vec, and 2014-04-10 22:10:10 +10:00
ptr.rs std: Add more docs for ptr mod 2014-04-08 00:03:11 -07:00
raw.rs std: Switch field privacy as necessary 2014-03-31 15:17:12 -07:00
rc.rs std: Switch field privacy as necessary 2014-03-31 15:17:12 -07:00
reference.rs std: remove the equals method from TotalEq. 2014-03-23 23:48:10 +11:00
reflect.rs rustc: remove ty_unboxed_vec. 2014-04-06 14:05:32 +03:00
repr.rs std,serialize: remove some internal uses of ~[]. 2014-04-10 15:21:58 -07:00
result.rs Rename from_iterator to from_iter for consistency. 2014-03-30 21:45:55 -07:00
rtdeps.rs Remove libc from std 2014-04-04 09:31:21 -07:00
slice.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
str.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
strbuf.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
task.rs Register new snapshots 2014-04-08 00:03:11 -07:00
to_str.rs Remove all ToStr impls, add Show impls 2014-02-23 20:51:56 -08:00
tuple.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
ty.rs Fix an unnecessary use of cast::transmute 2014-04-05 20:38:35 +02:00
unicode.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
unit.rs std: remove the equals method from TotalEq. 2014-03-23 23:48:10 +11:00
vec.rs std: Fix iteration over vectors of 0-size values 2014-04-11 15:12:56 -07:00