about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMax Wase <max.vvase@gmail.com>2021-10-12 08:01:24 +0300
committerGitHub <noreply@github.com>2021-10-12 08:01:24 +0300
commit36e050b85f5fc9acd27ff5e8cda57a36070f43e2 (patch)
tree47198e45ed0f402275b8f0c10b1c2df00ee6c8eb /library/std/src
parent55663a76f4cb9c3fe5c9641b9ab84d19806c33b9 (diff)
downloadrust-36e050b85f5fc9acd27ff5e8cda57a36070f43e2.tar.gz
rust-36e050b85f5fc9acd27ff5e8cda57a36070f43e2.zip
Update library/std/src/path.rs
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/path.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index a5b73c2580b..4a0df915212 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -2743,6 +2743,12 @@ impl Path {
     /// assert_eq!(link_path.is_symlink(), true);
     /// assert_eq!(link_path.exists(), false);
     /// ```
+    ///
+    /// # See Also
+    ///
+    /// This is a convenience function that coerces errors to false. If you want to
+    /// check errors, call [`fs::symlink_metadata`] and handle its [`Result`]. Then call
+    /// [`fs::Metadata::is_symlink`] if it was [`Ok`].
     #[stable(feature = "is_symlink", since = "1.57.0")]
     pub fn is_symlink(&self) -> bool {
         fs::symlink_metadata(self).map(|m| m.is_symlink()).unwrap_or(false)