diff options
| author | bors <bors@rust-lang.org> | 2019-08-14 07:08:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-14 07:08:50 +0000 |
| commit | c43d03a19f326f4a323569328cc501e86eb6d22e (patch) | |
| tree | b23585499e7030f4a92a0258242ad8fe36b91d53 /src/liballoc | |
| parent | 60960a260f7b5c695fd0717311d72ce62dd4eb43 (diff) | |
| parent | a8bb3756b65c1193c72bf59f4095b1ab6e84743d (diff) | |
| download | rust-c43d03a19f326f4a323569328cc501e86eb6d22e.tar.gz rust-c43d03a19f326f4a323569328cc501e86eb6d22e.zip | |
Auto merge of #63544 - Centril:rollup-qhqfcov, r=Centril
Rollup of 17 pull requests Successful merges: - #62760 (Deduplicate error messages in `librsctc_mir`) - #62849 (typeck: Prohibit RPIT types that inherit lifetimes) - #63383 (`async fn` lifetime elision tests) - #63421 (Implement Clone, Display for ascii::EscapeDefault) - #63459 (syntax: account for CVarArgs being in the argument list.) - #63475 (Bring back suggestion for splitting `<-` into `< -`) - #63485 (ci: move mirrors to their standalone bucket) - #63486 (Document `From` trait for `BinaryHeap`) - #63488 (improve DiagnosticBuilder docs) - #63493 (Remove unneeded comment in src/libcore/hash/mod.rs) - #63499 (handle elision in async fn correctly) - #63501 (use `ParamName` to track in-scope lifetimes instead of Ident) - #63508 (Do not ICE when synthesizing spans falling inside unicode chars) - #63511 (ci: add a check for clock drift) - #63512 (Provide map_ok and map_err method for Poll<Option<Result<T, E>>>) - #63529 (RELEASES.md: ? is one of three Kleene operators) - #63530 (Fix typo in error message.) Failed merges: r? @ghost
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/binary_heap.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs index 9f531f5b83c..3d04f30e7bd 100644 --- a/src/liballoc/collections/binary_heap.rs +++ b/src/liballoc/collections/binary_heap.rs @@ -1163,6 +1163,9 @@ impl<T> FusedIterator for Drain<'_, T> {} #[stable(feature = "binary_heap_extras_15", since = "1.5.0")] impl<T: Ord> From<Vec<T>> for BinaryHeap<T> { + /// Converts a `Vec<T>` into a `BinaryHeap<T>`. + /// + /// This conversion happens in-place, and has `O(n)` time complexity. fn from(vec: Vec<T>) -> BinaryHeap<T> { let mut heap = BinaryHeap { data: vec }; heap.rebuild(); |
