Skip to content

Commit 92418ce

Browse files
committed
Auto merge of rust-lang#85594 - Dylan-DPC:rollup-40sgqgg, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - rust-lang#84758 (MSVC: Avoid using jmp stubs for dll function imports) - rust-lang#85288 (add an example to explain std::io::Read::read returning 0 in some cases) - rust-lang#85334 (Add doc aliases to `unit`) - rust-lang#85525 (Fix my mailmap entry) - rust-lang#85571 (Remove surplus prepend LinkedList fn) - rust-lang#85575 (Fix auto-hide for implementations and implementors.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 9c3a2a5 + 85b45b5 commit 92418ce

File tree

9 files changed

+203
-194
lines changed

9 files changed

+203
-194
lines changed

.mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Brian Anderson <banderson@mozilla.com> <andersrb@gmail.com>
4343
Brian Anderson <banderson@mozilla.com> <banderson@mozilla.org>
4444
Brian Dawn <brian.t.dawn@gmail.com>
4545
Brian Leibig <brian@brianleibig.com> Brian Leibig <brian.leibig@gmail.com>
46+
Noah Lev <camelidcamel@gmail.com>
4647
Noah Lev <camelidcamel@gmail.com> <37223377+camelid@users.noreply.github.com>
4748
Carl-Anton Ingmarsson <mail@carlanton.se> <ca.ingmarsson@gmail.com>
4849
Carol (Nichols || Goulding) <carol.nichols@gmail.com> <193874+carols10cents@users.noreply.github.com>

library/alloc/src/collections/linked_list.rs

-21
Original file line numberDiff line numberDiff line change
@@ -442,27 +442,6 @@ impl<T> LinkedList<T> {
442442
}
443443
}
444444

445-
/// Moves all elements from `other` to the begin of the list.
446-
#[unstable(feature = "linked_list_prepend", issue = "none")]
447-
pub fn prepend(&mut self, other: &mut Self) {
448-
match self.head {
449-
None => mem::swap(self, other),
450-
Some(mut head) => {
451-
// `as_mut` is okay here because we have exclusive access to the entirety
452-
// of both lists.
453-
if let Some(mut other_tail) = other.tail.take() {
454-
unsafe {
455-
head.as_mut().prev = Some(other_tail);
456-
other_tail.as_mut().next = Some(head);
457-
}
458-
459-
self.head = other.head.take();
460-
self.len += mem::replace(&mut other.len, 0);
461-
}
462-
}
463-
}
464-
}
465-
466445
/// Provides a forward iterator.
467446
///
468447
/// # Examples

library/std/src/io/mod.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,12 @@ pub trait Read {
526526
///
527527
/// 1. This reader has reached its "end of file" and will likely no longer
528528
/// be able to produce bytes. Note that this does not mean that the
529-
/// reader will *always* no longer be able to produce bytes.
529+
/// reader will *always* no longer be able to produce bytes. As an example,
530+
/// on Linux, this method will call the `recv` syscall for a [`TcpStream`],
531+
/// where returning zero indicates the connection was shut down correctly. While
532+
/// for [`File`], it is possible to reach the end of file and get zero as result,
533+
/// but if more data is appended to the file, future calls to `read` will return
534+
/// more data.
530535
/// 2. The buffer specified was 0 bytes in length.
531536
///
532537
/// It is not an error if the returned value `n` is smaller than the buffer size,
@@ -568,6 +573,7 @@ pub trait Read {
568573
///
569574
/// [`Ok(n)`]: Ok
570575
/// [`File`]: crate::fs::File
576+
/// [`TcpStream`]: crate::net::TcpStream
571577
///
572578
/// ```no_run
573579
/// use std::io;

library/std/src/primitive_docs.rs

+3
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ mod prim_never {}
345345
mod prim_char {}
346346

347347
#[doc(primitive = "unit")]
348+
#[doc(alias = "(")]
349+
#[doc(alias = ")")]
350+
#[doc(alias = "()")]
348351
//
349352
/// The `()` type, also called "unit".
350353
///

0 commit comments

Comments
 (0)