Skip to content

Rollup of 10 pull requests #76781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ba4c498
Add more info for Vec Drain doc
pickfire Aug 29, 2020
7148412
Vec slice example fix style and show type elision
pickfire Aug 29, 2020
a80d390
Use inline(never) instead of cold
howard0su Sep 2, 2020
941dca8
Add Arith Tests in Library
Sep 5, 2020
dc37b55
Minor refactoring
Sep 5, 2020
7d834c8
Move Various str tests in library
Sep 5, 2020
d85db82
Add documentation for `impl<T> From<T> for Poll<T>`
notriddle Sep 9, 2020
8b0d0a0
Add documentation for `impl<T> From<BinaryHeap<T>> for Vec<T>`
notriddle Sep 9, 2020
85ab152
Update bootstrap readme
jyn514 Sep 12, 2020
73e0a56
Make all methods of `Duration` const
CDirkx Sep 4, 2020
4f0047e
Add a comment on is_trivially_sized about obviously !Sized types
nox Sep 12, 2020
75f0f7a
Fix a typo
nox Sep 12, 2020
caf6c92
Clean up some language trait items comparisons
nox Sep 12, 2020
1f572b0
Vec doc use elision as code rather than comment
pickfire Sep 15, 2020
d888725
reduce size of test_from_iter_specialization_with_iterator_adapters t…
RalfJung Sep 13, 2020
c528d24
fix slice::check_range aliasing problems
RalfJung Sep 13, 2020
7d67546
hopefully fix rustdoc links
RalfJung Sep 15, 2020
73858d0
Rollup merge of #76056 - pickfire:patch-10, r=jyn514
RalfJung Sep 16, 2020
fd86705
Rollup merge of #76062 - pickfire:patch-13, r=jyn514
RalfJung Sep 16, 2020
19a62db
Rollup merge of #76262 - howard0su:patch-1, r=cramertj
RalfJung Sep 16, 2020
22dd07d
Rollup merge of #76335 - CDirkx:const-duration, r=ecstatic-morse
RalfJung Sep 16, 2020
c1a74a3
Rollup merge of #76366 - ayushmishra2005:arith_tests_in_library, r=jy…
RalfJung Sep 16, 2020
3a4de42
Rollup merge of #76369 - ayushmishra2005:move_various_str_tests_libra…
RalfJung Sep 16, 2020
17015cd
Rollup merge of #76534 - notriddle:doc-comments, r=jyn514
RalfJung Sep 16, 2020
1ff91d6
Rollup merge of #76622 - jyn514:bootstrap-readme, r=Mark-Simulacrum
RalfJung Sep 16, 2020
0bcc96d
Rollup merge of #76641 - nox:pointee-random-stuff, r=eddyb
RalfJung Sep 16, 2020
9d0a265
Rollup merge of #76662 - RalfJung:lib-test-miri, r=Mark-Simulacrum
RalfJung Sep 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions library/alloc/src/collections/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,10 @@ impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {

#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
impl<T> From<BinaryHeap<T>> for Vec<T> {
/// Converts a `BinaryHeap<T>` into a `Vec<T>`.
///
/// This conversion requires no data movement or allocation, and has
/// constant time complexity.
fn from(heap: BinaryHeap<T>) -> Vec<T> {
heap.data
}
Expand Down
8 changes: 8 additions & 0 deletions library/core/src/task/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ impl<T, E> Poll<Option<Result<T, E>>> {

#[stable(feature = "futures_api", since = "1.36.0")]
impl<T> From<T> for Poll<T> {
/// Convert to a `Ready` variant.
///
/// # Example
///
/// ```
/// # use core::task::Poll;
/// assert_eq!(Poll::from(true), Poll::Ready(true));
/// ```
fn from(t: T) -> Poll<T> {
Poll::Ready(t)
}
Expand Down