about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-01-01 16:38:40 +0000
committerbors <bors@rust-lang.org>2016-01-01 16:38:40 +0000
commit5446139387fe21928dfbd3145aade01cf26829d4 (patch)
tree3a2f482aae82a7e912fa08508db24c98a34093d8 /src/libstd
parent88e819f478c530d4e1ca7243e327803771b532af (diff)
parent9a7e2329f2f260cd9dafe3080dcc4cdb1dac53a3 (diff)
downloadrust-5446139387fe21928dfbd3145aade01cf26829d4.tar.gz
rust-5446139387fe21928dfbd3145aade01cf26829d4.zip
Auto merge of #30670 - emoon:fs-copy-comment, r=steveklabnik
When looking in the documentation I often scan the examples the first thing I do. In these 3 cases it's not obvious which direction the operation happens by adding this comment it makes it more obvious.

r? @steveklabnik
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 66e4c6013a4..3975af74346 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -842,7 +842,7 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
 /// use std::fs;
 ///
 /// # fn foo() -> std::io::Result<()> {
-/// try!(fs::rename("a.txt", "b.txt"));
+/// try!(fs::rename("a.txt", "b.txt")); // Rename a.txt to b.txt
 /// # Ok(())
 /// # }
 /// ```
@@ -877,7 +877,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
 /// use std::fs;
 ///
 /// # fn foo() -> std::io::Result<()> {
-/// try!(fs::copy("foo.txt", "bar.txt"));
+/// try!(fs::copy("foo.txt", "bar.txt"));  // Copy foo.txt to bar.txt
 /// # Ok(()) }
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -896,7 +896,7 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
 /// use std::fs;
 ///
 /// # fn foo() -> std::io::Result<()> {
-/// try!(fs::hard_link("a.txt", "b.txt"));
+/// try!(fs::hard_link("a.txt", "b.txt")); // Hard link a.txt to b.txt
 /// # Ok(())
 /// # }
 /// ```