2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-31 09:45:36 +00:00

make all print macros unstable (#322)

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
Yoshua Wuyts 2019-10-14 14:48:12 +02:00 committed by Stjepan Glavina
parent 9b0e02dbb7
commit fe88da4e64
2 changed files with 10 additions and 0 deletions

View file

@ -79,5 +79,7 @@ cfg_if! {
mod macros; mod macros;
pub(crate) mod utils; pub(crate) mod utils;
#[cfg(any(feature = "unstable", feature = "docs"))]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)] #[doc(inline)]
pub use std::{write, writeln}; pub use std::{write, writeln};

View file

@ -43,6 +43,8 @@
/// # /// #
/// # }) /// # })
/// ``` /// ```
#[cfg(any(feature = "unstable", feature = "docs"))]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[macro_export] #[macro_export]
macro_rules! print { macro_rules! print {
($($arg:tt)*) => ($crate::io::_print(format_args!($($arg)*))) ($($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_export]
macro_rules! println { macro_rules! println {
() => ($crate::print!("\n")); () => ($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_export]
macro_rules! eprint { macro_rules! eprint {
($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*))) ($($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_export]
macro_rules! eprintln { macro_rules! eprintln {
() => (async { $crate::eprint!("\n").await; }); () => (async { $crate::eprint!("\n").await; });