about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-07 12:48:20 +0000
committerbors <bors@rust-lang.org>2018-09-07 12:48:20 +0000
commit5a3292f163da3327523ddec5bc44d17c2378ec37 (patch)
treef6cba61434ccd1e0c0d92ea41929faeeb00436cf /src/libstd
parent7366752a6164dd8e004f32c1a40f0e04a61bcbb2 (diff)
parent87fbf544135d1ba8812c0589ba947394e53730a8 (diff)
downloadrust-5a3292f163da3327523ddec5bc44d17c2378ec37.tar.gz
rust-5a3292f163da3327523ddec5bc44d17c2378ec37.zip
Auto merge of #54021 - kennytm:rollup, r=kennytm
Rollup of 17 pull requests

Successful merges:

 - #53299 (Updated core/macros.rs to note it works in a no_std environment.)
 - #53376 (Cross reference io::copy and fs::copy in docs.)
 - #53455 (Individual docs for {from,to}_*_bytes)
 - #53550 (librustc_lint: In recursion warning, change 'recurring' to 'recursing')
 - #53860 (Migrate (some) of run-pass/ to ui)
 - #53874 (Implement Unpin for Box, Rc, and Arc)
 - #53895 (tidy: Cleanups and clippy warning fixes)
 - #53946 (Clarify `ManuallyDrop` docs)
 - #53948 (Minimized clippy test from when NLL disabled two-phase borrows)
 - #53959 (Add .git extension to submodule paths missing it)
 - #53966 (A few cleanups and minor improvements to mir/dataflow)
 - #53967 (propagate build.python into cmake)
 - #53979 (Remove `#[repr(transparent)]` from atomics)
 - #53991 (Add unchecked_shl/shr check for intrinsics to fix miri's test suit)
 - #53992 (migrate run-pass/borrowck to ui/run-pass)
 - #53994 (migrate run-pass/*/ to ui/run-pass)
 - #54023 (update clippy submodule)
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs6
-rw-r--r--src/libstd/io/util.rs5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index e177d4a988a..f14d55cb2d3 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -1566,6 +1566,12 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
 /// On success, the total number of bytes copied is returned and it is equal to
 /// the length of the `to` file as reported by `metadata`.
 ///
+/// If you’re wanting to copy the contents of one file to another and you’re
+/// working with [`File`]s, see the [`io::copy`] function.
+///
+/// [`io::copy`]: ../io/fn.copy.html
+/// [`File`]: ./struct.File.html
+///
 /// # Platform-specific behavior
 ///
 /// This function currently corresponds to the `open` function in Unix
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs
index 33f741dbc38..371e5b21c13 100644
--- a/src/libstd/io/util.rs
+++ b/src/libstd/io/util.rs
@@ -23,6 +23,11 @@ use mem;
 /// On success, the total number of bytes that were copied from
 /// `reader` to `writer` is returned.
 ///
+/// If you’re wanting to copy the contents of one file to another and you’re
+/// working with filesystem paths, see the [`fs::copy`] function.
+///
+/// [`fs::copy`]: ../fs/fn.copy.html
+///
 /// # Errors
 ///
 /// This function will return an error immediately if any call to `read` or