From 01435fc83a5f3ed827d7ce618f4e3068a6ff964f Mon Sep 17 00:00:00 2001 From: Max Wase Date: Fri, 18 Jun 2021 14:17:21 +0300 Subject: [PATCH] `no_run` and `ignore` doc attributes --- library/std/src/fs.rs | 3 ++- library/std/src/path.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 521693d7f2c..9076656f64e 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -1011,7 +1011,8 @@ pub fn is_file(&self) -> bool { /// /// # 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; diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 055c9514445..272ea5a3686 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -2578,7 +2578,8 @@ pub fn is_dir(&self) -> bool { /// /// # Examples /// - /// ```no_run + #[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;