]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/io/mod.rs
Fix merge conflict with recent PR
[rust.git] / src / libstd / io / mod.rs
index 823ce30febed425ac794e6e1440a203b43029edb..797318d95b7775f3d5e13011acc9401da7cfb1ee 100644 (file)
@@ -722,7 +722,9 @@ fn read_to_string(&mut self, buf: &mut String) -> Result<usize> {
     /// No guarantees are provided about the contents of `buf` when this
     /// function is called, implementations cannot rely on any property of the
     /// contents of `buf` being true. It is recommended that implementations
-    /// only write data to `buf` instead of reading its contents.
+    /// only write data to `buf` instead of reading its contents. The
+    /// documentation on [`read`] has a more detailed explanation on this
+    /// subject.
     ///
     /// # Errors
     ///
@@ -745,6 +747,7 @@ fn read_to_string(&mut self, buf: &mut String) -> Result<usize> {
     ///
     /// [`File`]s implement `Read`:
     ///
+    /// [`read`]: Read::read
     /// [`File`]: crate::fs::File
     ///
     /// ```no_run