From ef7dbf3fc944e47363bad088f4ca2fa3ab6c4c76 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Mon, 14 Oct 2019 01:10:43 +0200 Subject: [PATCH] make all print macros unstable Signed-off-by: Yoshua Wuyts --- src/lib.rs | 2 ++ src/macros.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index f69d1f89c..cef50ae24 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,5 +79,7 @@ cfg_if! { mod macros; pub(crate) mod utils; +#[cfg(any(feature = "unstable", feature = "docs"))] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[doc(inline)] pub use std::{write, writeln}; diff --git a/src/macros.rs b/src/macros.rs index d7e4ae444..d70b779fe 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -43,6 +43,8 @@ /// # /// # }) /// ``` +#[cfg(any(feature = "unstable", feature = "docs"))] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[macro_export] macro_rules! print { ($($arg:tt)*) => ($crate::io::_print(format_args!($($arg)*))) @@ -79,6 +81,8 @@ macro_rules! print { /// # /// # }) /// ``` +#[cfg(any(feature = "unstable", feature = "docs"))] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[macro_export] macro_rules! println { () => ($crate::print!("\n")); @@ -112,6 +116,8 @@ macro_rules! println { /// # /// # }) /// ``` +#[cfg(any(feature = "unstable", feature = "docs"))] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[macro_export] macro_rules! eprint { ($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*))) @@ -144,6 +150,8 @@ macro_rules! eprint { /// # /// # }) /// ``` +#[cfg(any(feature = "unstable", feature = "docs"))] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[macro_export] macro_rules! eprintln { () => (async { $crate::eprint!("\n").await; });