From fe6dfcd28a9cbb8080313433a825cdec7b6a78b3 Mon Sep 17 00:00:00 2001
From: Peter Jaszkowiak
Date: Thu, 15 Oct 2020 22:48:57 -0600
Subject: [PATCH 1/2] Intra-doc links for std::io::buffered
---
library/std/src/io/buffered/bufreader.rs | 2 +-
library/std/src/io/buffered/bufwriter.rs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/library/std/src/io/buffered/bufreader.rs b/library/std/src/io/buffered/bufreader.rs
index 8fe29f08a7bd7..777d376f99173 100644
--- a/library/std/src/io/buffered/bufreader.rs
+++ b/library/std/src/io/buffered/bufreader.rs
@@ -21,7 +21,7 @@ use crate::io::{self, BufRead, Initializer, IoSliceMut, Read, Seek, SeekFrom, DE
/// unwrapping the `BufReader` with [`BufReader::into_inner`] can also cause
/// data loss.
///
-/// [`TcpStream::read`]: Read::read
+/// [`TcpStream::read`]: super::super::super::net::TcpStream::read
/// [`TcpStream`]: crate::net::TcpStream
///
/// # Examples
diff --git a/library/std/src/io/buffered/bufwriter.rs b/library/std/src/io/buffered/bufwriter.rs
index 3ec272fea6668..a1face6443ae6 100644
--- a/library/std/src/io/buffered/bufwriter.rs
+++ b/library/std/src/io/buffered/bufwriter.rs
@@ -59,9 +59,9 @@ use crate::io::{
/// together by the buffer and will all be written out in one system call when
/// the `stream` is flushed.
///
-/// [`TcpStream::write`]: Write::write
+/// [`TcpStream::write`]: super::super::super::net::TcpStream::write
/// [`TcpStream`]: crate::net::TcpStream
-/// [`flush`]: Write::flush
+/// [`flush`]: BufWriter::flush
#[stable(feature = "rust1", since = "1.0.0")]
pub struct BufWriter {
inner: Option,
From 8d48e3bbb2da2f5eb5f4a95efd6846e9ea93a160 Mon Sep 17 00:00:00 2001
From: Peter Jaszkowiak
Date: Thu, 5 Nov 2020 19:26:08 -0700
Subject: [PATCH 2/2] document HACKs
---
library/std/src/io/buffered/bufreader.rs | 1 +
library/std/src/io/buffered/bufwriter.rs | 1 +
2 files changed, 2 insertions(+)
diff --git a/library/std/src/io/buffered/bufreader.rs b/library/std/src/io/buffered/bufreader.rs
index 777d376f99173..16c18d6e14645 100644
--- a/library/std/src/io/buffered/bufreader.rs
+++ b/library/std/src/io/buffered/bufreader.rs
@@ -21,6 +21,7 @@ use crate::io::{self, BufRead, Initializer, IoSliceMut, Read, Seek, SeekFrom, DE
/// unwrapping the `BufReader` with [`BufReader::into_inner`] can also cause
/// data loss.
///
+// HACK(#78696): can't use `crate` for associated items
/// [`TcpStream::read`]: super::super::super::net::TcpStream::read
/// [`TcpStream`]: crate::net::TcpStream
///
diff --git a/library/std/src/io/buffered/bufwriter.rs b/library/std/src/io/buffered/bufwriter.rs
index a1face6443ae6..067ed6ba7ff50 100644
--- a/library/std/src/io/buffered/bufwriter.rs
+++ b/library/std/src/io/buffered/bufwriter.rs
@@ -59,6 +59,7 @@ use crate::io::{
/// together by the buffer and will all be written out in one system call when
/// the `stream` is flushed.
///
+// HACK(#78696): can't use `crate` for associated items
/// [`TcpStream::write`]: super::super::super::net::TcpStream::write
/// [`TcpStream`]: crate::net::TcpStream
/// [`flush`]: BufWriter::flush