diff options
| author | Zack Weinberg <zackw@panix.com> | 2017-04-13 10:48:09 -0400 |
|---|---|---|
| committer | Zack Weinberg <zackw@panix.com> | 2017-05-10 09:41:42 -0400 |
| commit | 07766f675caaabc1d64ef59db6ddfa43e72e6d4f (patch) | |
| tree | f7d1f4a1d192f2705668b283b4b35cf69063b38c /src/libstd/macros.rs | |
| parent | 76127275a09d970169952bcf616f966faa9ed6db (diff) | |
| download | rust-07766f675caaabc1d64ef59db6ddfa43e72e6d4f.tar.gz rust-07766f675caaabc1d64ef59db6ddfa43e72e6d4f.zip | |
Revise the eprint(ln)! feature.
* Factor out the nigh-identical bodies of `_print` and `_eprint` to a helper function `print_to` (I was sorely tempted to call it `_doprnt`). * Update the issue number for the unstable `eprint` feature. * Add entries to the "unstable book" for `eprint` and `eprint_internal`. * Style corrections to the documentation.
Diffstat (limited to 'src/libstd/macros.rs')
| -rw-r--r-- | src/libstd/macros.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index d1c304ec46e..98c635d127f 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -113,7 +113,7 @@ macro_rules! print { /// /// # Panics /// -/// Panics if writing to `io::stdout()` fails. +/// Panics if writing to `io::stdout` fails. /// /// # Examples /// @@ -133,7 +133,7 @@ macro_rules! println { /// Macro for printing to the standard error. /// /// Equivalent to the `print!` macro, except that output goes to -/// `io::stderr()` instead of `io::stdout()`. See `print!` for +/// `io::stderr` instead of `io::stdout`. See `print!` for /// example usage. /// /// Use `eprint!` only for error and progress messages. Use `print!` @@ -141,9 +141,9 @@ macro_rules! println { /// /// # Panics /// -/// Panics if writing to `io::stderr()` fails. +/// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="39228")] +#[unstable(feature = "eprint", issue="40528")] #[allow_internal_unstable] macro_rules! eprint { ($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*))); @@ -152,7 +152,7 @@ macro_rules! eprint { /// Macro for printing to the standard error, with a newline. /// /// Equivalent to the `println!` macro, except that output goes to -/// `io::stderr()` instead of `io::stdout()`. See `println!` for +/// `io::stderr` instead of `io::stdout`. See `println!` for /// example usage. /// /// Use `eprintln!` only for error and progress messages. Use `println!` @@ -160,9 +160,9 @@ macro_rules! eprint { /// /// # Panics /// -/// Panics if writing to `io::stderr()` fails. +/// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="39228")] +#[unstable(feature = "eprint", issue="40528")] macro_rules! eprintln { () => (eprint!("\n")); ($fmt:expr) => (eprint!(concat!($fmt, "\n"))); |
