rust/src
bors efebe45cc0 Auto merge of #25856 - bluss:binary-heap-hole, r=Gankro
collections: Make BinaryHeap panic safe in sift_up / sift_down

Use a struct called Hole that keeps track of an invalid location
in the vector and fills the hole on drop.

I include a run-pass test that the current BinaryHeap fails, and the new
one passes.

NOTE: The BinaryHeap will still be inconsistent after a comparison fails. It will
not have the heap property. What we fix is just that elements will be valid
values.

This is actually a performance win -- the new code does not bother to write in `zeroed()`
values in the holes, it just leaves them as they were.

Net result is something like a 5% decrease in runtime for `BinaryHeap::from_vec`. This
can be further improved by using unchecked indexing (I confirmed it makes a difference,
not a surprise with the non-sequential access going on), but let's leave that for another PR.
Safety first 😉 

Fixes #25842
2015-05-28 20:16:08 +00:00
..
compiler-rt@58ab642c30
compiletest Revamp codegen tests to check IR quality instead of quantity 2015-05-27 12:08:31 +02:00
doc Auto merge of #25829 - steveklabnik:ioresult_fixes, r=alexcrichton 2015-05-28 17:34:30 +00:00
driver
error-index-generator
etc
grammar
jemalloc@e24a1a025a
liballoc Remove #[cfg(stage0)] items. 2015-05-27 11:19:02 +03:00
libarena
libbacktrace
libcollections Auto merge of #25856 - bluss:binary-heap-hole, r=Gankro 2015-05-28 20:16:08 +00:00
libcollectionstest Use const fn to abstract away the contents of UnsafeCell & friends. 2015-05-27 11:19:03 +03:00
libcore Auto merge of #25843 - shepmaster:remove-public-int-and-uint, r=huonw 2015-05-28 09:20:49 +00:00
libcoretest Use const fn to abstract away the contents of UnsafeCell & friends. 2015-05-27 11:19:03 +03:00
libflate
libfmt_macros
libgetopts
libgraphviz
liblibc
liblog Use const fn to abstract away the contents of UnsafeCell & friends. 2015-05-27 11:19:03 +03:00
librand
librbml
librustc Auto merge of #25834 - steveklabnik:gh25326, r=alexcrichton 2015-05-28 13:57:36 +00:00
librustc_back
librustc_bitflags
librustc_borrowck Auto merge of #25790 - eddyb:oh-snap-ctfe-arrived, r=alexcrichton 2015-05-27 08:47:53 +00:00
librustc_data_structures
librustc_driver Auto merge of #25741 - richo:backtrace-message, r=alexcrichton 2015-05-27 02:15:44 +00:00
librustc_lint
librustc_llvm
librustc_privacy
librustc_resolve Remove #[cfg(stage0)] items. 2015-05-27 11:19:02 +03:00
librustc_trans Auto merge of #25783 - nrc:save-api-2, r=@huonw 2015-05-28 06:54:57 +00:00
librustc_typeck Auto merge of #25796 - arielb1:default-assoc, r=eddyb 2015-05-27 22:05:09 +00:00
librustc_unicode
librustdoc Auto merge of #25796 - arielb1:default-assoc, r=eddyb 2015-05-27 22:05:09 +00:00
libserialize
libstd remove references to IoResult 2015-05-28 12:51:01 -04:00
libsyntax Auto merge of #25791 - barosl:use-paths-as-items, r=alexcrichton 2015-05-27 07:14:45 +00:00
libterm
libtest Enable colored test output when capturing output of tests 2015-05-26 23:51:13 +02:00
llvm@bff6907697
rt
rust-installer@e54d4823d2
rustbook
rustllvm
test Auto merge of #25856 - bluss:binary-heap-hole, r=Gankro 2015-05-28 20:16:08 +00:00
snapshots.txt Register snapshots (2015-05-24 ba0e1cd). 2015-05-27 11:19:02 +03:00