Skip to content

Commit

Permalink
Auto merge of #85594 - Dylan-DPC:rollup-40sgqgg, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Rollup of 6 pull requests

Successful merges:

 - #84758 (MSVC: Avoid using jmp stubs for dll function imports)
 - #85288 (add an example to explain std::io::Read::read returning 0 in some cases)
 - #85334 (Add doc aliases to `unit`)
 - #85525 (Fix my mailmap entry)
 - #85571 (Remove surplus prepend LinkedList fn)
 - #85575 (Fix auto-hide for implementations and implementors.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed May 23, 2021
2 parents 9c3a2a5 + 85b45b5 commit 92418ce
Show file tree
Hide file tree
Showing 9 changed files with 203 additions and 194 deletions.
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

0 comments on commit 92418ce

Please sign in to comment.