about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2018-04-02 09:11:07 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2018-04-03 15:25:55 -0700
commit1ce98f34d38fa9338ff696f904bcb8c01856f935 (patch)
treebfea0bbeb672cc162d20af3247c3557c783fffeb /src/libstd/io
parent85310860c25c8525c03b2ffe12674c1914917aa0 (diff)
downloadrust-1ce98f34d38fa9338ff696f904bcb8c01856f935.tar.gz
rust-1ce98f34d38fa9338ff696f904bcb8c01856f935.zip
Cross-reference fs::read functions from io::Read docs
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 63b631ace96..3b8c42ddb39 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -595,6 +595,11 @@ pub trait Read {
     ///     Ok(())
     /// }
     /// ```
+    ///
+    /// (See also the [`std::fs::read`] convenience function for reading from a
+    /// file.)
+    ///
+    /// [`std::fs::read`]: ../fs/fn.read.html
     #[stable(feature = "rust1", since = "1.0.0")]
     fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize> {
         read_to_end(self, buf)
@@ -633,6 +638,11 @@ pub trait Read {
     ///     Ok(())
     /// }
     /// ```
+    ///
+    /// (See also the [`std::fs::read_to_string`] convenience function for
+    /// reading from a file.)
+    ///
+    /// [`std::fs::read_to_string`]: ../fs/fn.read_to_string.html
     #[stable(feature = "rust1", since = "1.0.0")]
     fn read_to_string(&mut self, buf: &mut String) -> Result<usize> {
         // Note that we do *not* call `.read_to_end()` here. We are passing