about summary refs log tree commit diff
diff options
context:
space:
mode:
authorD1mon <3872485+D1mon@users.noreply.github.com>2021-07-03 15:31:16 +0300
committerYuki Okushi <yuki.okushi@huawei.com>2021-07-29 04:23:01 +0900
commit387cd6dbf67754472b59ab4810a7e15107d86f2b (patch)
tree04cdd3436d6b98b3f536c8615da83f6703e1676e
parenteba3228b2a9875d268ff3990903d04e19f6cdb0c (diff)
downloadrust-387cd6dbf67754472b59ab4810a7e15107d86f2b.tar.gz
rust-387cd6dbf67754472b59ab4810a7e15107d86f2b.zip
Add some doc aliases
Add `mkdir` to `create_dir`, `rmdir` to `remove_dir`.
-rw-r--r--library/std/src/fs.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index bbe1ab40537..f72f88bb05c 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -1912,6 +1912,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
 ///     Ok(())
 /// }
 /// ```
+#[doc(alias = "mkdir")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
     DirBuilder::new().create(path.as_ref())
@@ -1991,6 +1992,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
 ///     Ok(())
 /// }
 /// ```
+#[doc(alias = "rmdir")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
     fs_imp::rmdir(path.as_ref())