]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/fs.rs
Rollup merge of #86673 - m-ou-se:disjoint-capture-edition-lint, r=nikomatsakis
[rust.git] / library / std / src / fs.rs
index 97b5e26bd0b09746c37743565760d81e5977c6cf..9076656f64e9fc250d38d78f7c81428657fa81fc 100644 (file)
@@ -1007,17 +1007,19 @@ pub fn is_file(&self) -> bool {
         self.file_type().is_file()
     }
 
-    /// Returns `true` if this metadata is for a symbolic link file.
+    /// Returns `true` if this metadata is for a symbolic link.
     ///
     /// # Examples
     ///
-    /// ```no_run
+    #[cfg_attr(unix, doc = "```no_run")]
+    #[cfg_attr(not(unix), doc = "```ignore")]
+    /// #![feature(is_symlink)]
     /// use std::fs;
     /// use std::path::Path;
     /// use std::os::unix::fs::symlink;
     ///
     /// fn main() -> std::io::Result<()> {
-    ///     let link_path = Path::new("/link");
+    ///     let link_path = Path::new("link");
     ///     symlink("/origin_does_not_exists/", link_path)?;
     ///
     ///     let metadata = fs::symlink_metadata(link_path)?;
@@ -1026,7 +1028,7 @@ pub fn is_file(&self) -> bool {
     ///     Ok(())
     /// }
     /// ```
-    #[unstable(feature = "is_symlink", issue = "none")]
+    #[unstable(feature = "is_symlink", issue = "85748")]
     pub fn is_symlink(&self) -> bool {
         self.file_type().is_symlink()
     }