Skip to content

Commit fe88da4

Browse files
yoshuawuytsStjepan Glavina
authored and
Stjepan Glavina
committed
make all print macros unstable (#322)
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
1 parent 9b0e02d commit fe88da4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,7 @@ cfg_if! {
7979
mod macros;
8080
pub(crate) mod utils;
8181

82+
#[cfg(any(feature = "unstable", feature = "docs"))]
83+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
8284
#[doc(inline)]
8385
pub use std::{write, writeln};

src/macros.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
/// #
4444
/// # })
4545
/// ```
46+
#[cfg(any(feature = "unstable", feature = "docs"))]
47+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
4648
#[macro_export]
4749
macro_rules! print {
4850
($($arg:tt)*) => ($crate::io::_print(format_args!($($arg)*)))
@@ -79,6 +81,8 @@ macro_rules! print {
7981
/// #
8082
/// # })
8183
/// ```
84+
#[cfg(any(feature = "unstable", feature = "docs"))]
85+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
8286
#[macro_export]
8387
macro_rules! println {
8488
() => ($crate::print!("\n"));
@@ -112,6 +116,8 @@ macro_rules! println {
112116
/// #
113117
/// # })
114118
/// ```
119+
#[cfg(any(feature = "unstable", feature = "docs"))]
120+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
115121
#[macro_export]
116122
macro_rules! eprint {
117123
($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*)))
@@ -144,6 +150,8 @@ macro_rules! eprint {
144150
/// #
145151
/// # })
146152
/// ```
153+
#[cfg(any(feature = "unstable", feature = "docs"))]
154+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
147155
#[macro_export]
148156
macro_rules! eprintln {
149157
() => (async { $crate::eprint!("\n").await; });

0 commit comments

Comments
 (0)