]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/path.rs
Stabilize `is_symlink()` for `Metadata` and `Path`
[rust.git] / library / std / src / path.rs
index a45ecf6ea8c63ed05ee1ff29482d6546b5fc98dd..a5b73c2580be6828fa60756cbe032ad4372c8e5a 100644 (file)
@@ -2723,7 +2723,7 @@ pub fn is_dir(&self) -> bool {
         fs::metadata(self).map(|m| m.is_dir()).unwrap_or(false)
     }
 
-    /// Returns true if the path exists on disk and is pointing at a symbolic link.
+    /// Returns `true` if the path exists on disk and is pointing at a symbolic link.
     ///
     /// This function will not traverse symbolic links.
     /// In case of a broken symbolic link this will also return true.
@@ -2735,7 +2735,6 @@ pub fn is_dir(&self) -> bool {
     ///
     #[cfg_attr(unix, doc = "```no_run")]
     #[cfg_attr(not(unix), doc = "```ignore")]
-    /// #![feature(is_symlink)]
     /// use std::path::Path;
     /// use std::os::unix::fs::symlink;
     ///
@@ -2744,7 +2743,7 @@ pub fn is_dir(&self) -> bool {
     /// assert_eq!(link_path.is_symlink(), true);
     /// assert_eq!(link_path.exists(), false);
     /// ```
-    #[unstable(feature = "is_symlink", issue = "85748")]
+    #[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)
     }