about summary refs log tree commit diff
path: root/src/libstd/fs.rs
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2017-06-28 13:43:56 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2017-06-28 13:43:56 +0200
commit2783d0f7dac17f764c6580a04877e6813be574d2 (patch)
tree8bc5e8c703bf42b43f98d0db590cd1604be82af1 /src/libstd/fs.rs
parent71252d9b80020d932aa7960a3930684489a6e167 (diff)
downloadrust-2783d0f7dac17f764c6580a04877e6813be574d2.tar.gz
rust-2783d0f7dac17f764c6580a04877e6813be574d2.zip
Add links to the `ErrorKind` variants in errors of `open`
Diffstat (limited to 'src/libstd/fs.rs')
-rw-r--r--src/libstd/fs.rs27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index f1ec4d2dff0..88994b284c9 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -654,25 +654,25 @@ impl OpenOptions {
     ///
     /// This function will return an error under a number of different
     /// circumstances. Some of these error conditions are listed here, together
-    /// with their [`ErrorKind`]. The mapping to `ErrorKind`s is not part of
+    /// with their [`ErrorKind`]. The mapping to [`ErrorKind`]s is not part of
     /// the compatiblity contract of the function, especially the `Other` kind
     /// might change to more specific kinds in the future.
     ///
-    /// * `NotFound`: The specified file does not exist and neither `create` or
-    ///   `create_new` is set,
-    /// * `NotFound`: One of the directory components of the file path does not
-    ///   exist.
-    /// * `PermissionDenied`: The user lacks permission to get the specified
+    /// * [`NotFound`]: The specified file does not exist and neither `create`
+    ///   or `create_new` is set.
+    /// * [`NotFound`]: One of the directory components of the file path does
+    ///   not exist.
+    /// * [`PermissionDenied`]: The user lacks permission to get the specified
     ///   access rights for the file.
-    /// * `PermissionDenied`: The user lacks permission to open one of the
+    /// * [`PermissionDenied`]: The user lacks permission to open one of the
     ///   directory components of the specified path.
-    /// * `AlreadyExists`: `create_new` was specified and the file already
+    /// * [`AlreadyExists`]: `create_new` was specified and the file already
     ///   exists.
-    /// * `InvalidInput`: Invalid combinations of open options (truncate
+    /// * [`InvalidInput`]: Invalid combinations of open options (truncate
     ///   without write access, no access mode set, etc.).
-    /// * `Other`: One of the directory components of the specified file path
+    /// * [`Other`]: One of the directory components of the specified file path
     ///   was not, in fact, a directory.
-    /// * `Other`: Filesystem-level errors: full disk, write permission
+    /// * [`Other`]: Filesystem-level errors: full disk, write permission
     ///   requested on a read-only file system, exceeded disk quota, too many
     ///   open files, too long filename, too many symbolic links in the
     ///   specified path (Unix-like systems only), etc.
@@ -686,6 +686,11 @@ impl OpenOptions {
     /// ```
     ///
     /// [`ErrorKind`]: ../io/enum.ErrorKind.html
+    /// [`AlreadyExists`]: ../io/enum.ErrorKind.html#variant.AlreadyExists
+    /// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
+    /// [`NotFound`]: ../io/enum.ErrorKind.html#variant.NotFound
+    /// [`Other`]: ../io/enum.ErrorKind.html#variant.Other
+    /// [`PermissionDenied`]: ../io/enum.ErrorKind.html#variant.PermissionDenied
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn open<P: AsRef<Path>>(&self, path: P) -> io::Result<File> {
         self._open(path.as_ref())