Skip to content

Rollup of 6 pull requests #85594

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 13 commits into from
May 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Brian Anderson <banderson@mozilla.com> <andersrb@gmail.com>
Brian Anderson <banderson@mozilla.com> <banderson@mozilla.org>
Brian Dawn <brian.t.dawn@gmail.com>
Brian Leibig <brian@brianleibig.com> Brian Leibig <brian.leibig@gmail.com>
Noah Lev <camelidcamel@gmail.com>
Noah Lev <camelidcamel@gmail.com> <37223377+camelid@users.noreply.github.com>
Carl-Anton Ingmarsson <mail@carlanton.se> <ca.ingmarsson@gmail.com>
Carol (Nichols || Goulding) <carol.nichols@gmail.com> <193874+carols10cents@users.noreply.github.com>
Expand Down
21 changes: 0 additions & 21 deletions library/alloc/src/collections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,27 +442,6 @@ impl<T> LinkedList<T> {
}
}

/// Moves all elements from `other` to the begin of the list.
#[unstable(feature = "linked_list_prepend", issue = "none")]
pub fn prepend(&mut self, other: &mut Self) {
match self.head {
None => mem::swap(self, other),
Some(mut head) => {
// `as_mut` is okay here because we have exclusive access to the entirety
// of both lists.
if let Some(mut other_tail) = other.tail.take() {
unsafe {
head.as_mut().prev = Some(other_tail);
other_tail.as_mut().next = Some(head);
}

self.head = other.head.take();
self.len += mem::replace(&mut other.len, 0);
}
}
}
}

/// Provides a forward iterator.
///
/// # Examples
Expand Down
8 changes: 7 additions & 1 deletion library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,12 @@ pub trait Read {
///
/// 1. This reader has reached its "end of file" and will likely no longer
/// be able to produce bytes. Note that this does not mean that the
/// reader will *always* no longer be able to produce bytes.
/// reader will *always* no longer be able to produce bytes. As an example,
/// on Linux, this method will call the `recv` syscall for a [`TcpStream`],
/// where returning zero indicates the connection was shut down correctly. While
/// for [`File`], it is possible to reach the end of file and get zero as result,
/// but if more data is appended to the file, future calls to `read` will return
/// more data.
/// 2. The buffer specified was 0 bytes in length.
///
/// It is not an error if the returned value `n` is smaller than the buffer size,
Expand Down Expand Up @@ -568,6 +573,7 @@ pub trait Read {
///
/// [`Ok(n)`]: Ok
/// [`File`]: crate::fs::File
/// [`TcpStream`]: crate::net::TcpStream
///
/// ```no_run
/// use std::io;
Expand Down
3 changes: 3 additions & 0 deletions library/std/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ mod prim_never {}
mod prim_char {}

#[doc(primitive = "unit")]
#[doc(alias = "(")]
#[doc(alias = ")")]
#[doc(alias = "()")]
//
/// The `()` type, also called "unit".
///
Expand Down
Loading