From 4ab3bcb9ca137ad6e6ee4ae4a70a234d92b6d4ab Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 20 Apr 2017 17:37:12 -0400 Subject: [PATCH] Fix up stability annotations per feedback. --- src/doc/unstable-book/src/SUMMARY.md | 4 +--- .../unstable-book/src/library-features/eprint.md | 13 ------------- .../{eprint-internal.md => print-internals.md} | 2 +- src/doc/unstable-book/src/library-features/print.md | 5 ----- src/libstd/io/mod.rs | 6 +++--- src/libstd/io/stdio.rs | 4 ++-- src/libstd/macros.rs | 4 ++-- src/test/run-pass/print-stdout-eprint-stderr.rs | 2 -- 8 files changed, 9 insertions(+), 31 deletions(-) delete mode 100644 src/doc/unstable-book/src/library-features/eprint.md rename src/doc/unstable-book/src/library-features/{eprint-internal.md => print-internals.md} (84%) delete mode 100644 src/doc/unstable-book/src/library-features/print.md diff --git a/src/doc/unstable-book/src/SUMMARY.md b/src/doc/unstable-book/src/SUMMARY.md index 9229f445297..8f26e4d36cd 100644 --- a/src/doc/unstable-book/src/SUMMARY.md +++ b/src/doc/unstable-book/src/SUMMARY.md @@ -130,8 +130,6 @@ - [derive_eq](library-features/derive-eq.md) - [discriminant_value](library-features/discriminant-value.md) - [error_type_id](library-features/error-type-id.md) - - [eprint](library-features/eprint.md) - - [eprint_internal](library-features/eprint-internal.md) - [exact_size_is_empty](library-features/exact-size-is-empty.md) - [fd](library-features/fd.md) - [fd_read](library-features/fd-read.md) @@ -180,7 +178,7 @@ - [peek](library-features/peek.md) - [placement_in](library-features/placement-in.md) - [placement_new_protocol](library-features/placement-new-protocol.md) - - [print](library-features/print.md) + - [print_internals](library-features/print-internals.md) - [proc_macro_internals](library-features/proc-macro-internals.md) - [process_try_wait](library-features/process-try-wait.md) - [question_mark_carrier](library-features/question-mark-carrier.md) diff --git a/src/doc/unstable-book/src/library-features/eprint.md b/src/doc/unstable-book/src/library-features/eprint.md deleted file mode 100644 index 69f781b2241..00000000000 --- a/src/doc/unstable-book/src/library-features/eprint.md +++ /dev/null @@ -1,13 +0,0 @@ -# `eprint` - -The tracking issue for this feature is: [#40528] - -[#40528]: https://github.com/rust-lang/rust/issues/40528 - ------------------------- - -This feature enables the `eprint!` and `eprintln!` global macros, -which are just like `print!` and `println!`, respectively, except that -they send output to the standard _error_ stream, rather than standard -output. (`panic!` messages have always been written to standard error.) - diff --git a/src/doc/unstable-book/src/library-features/eprint-internal.md b/src/doc/unstable-book/src/library-features/print-internals.md similarity index 84% rename from src/doc/unstable-book/src/library-features/eprint-internal.md rename to src/doc/unstable-book/src/library-features/print-internals.md index d3230d8bfa8..a68557872af 100644 --- a/src/doc/unstable-book/src/library-features/eprint-internal.md +++ b/src/doc/unstable-book/src/library-features/print-internals.md @@ -1,4 +1,4 @@ -# `eprint_internal` +# `print_internals` This feature is internal to the Rust compiler and is not intended for general use. diff --git a/src/doc/unstable-book/src/library-features/print.md b/src/doc/unstable-book/src/library-features/print.md deleted file mode 100644 index dc25cb237e3..00000000000 --- a/src/doc/unstable-book/src/library-features/print.md +++ /dev/null @@ -1,5 +0,0 @@ -# `print` - -This feature is internal to the Rust compiler and is not intended for general use. - ------------------------- diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 9320bfe9abe..c872a8e5261 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -287,11 +287,11 @@ #[stable(feature = "rust1", since = "1.0.0")] pub use self::util::{copy, sink, Sink, empty, Empty, repeat, Repeat}; #[stable(feature = "rust1", since = "1.0.0")] -pub use self::stdio::{stdin, stdout, stderr, _print, Stdin, Stdout, Stderr}; +pub use self::stdio::{stdin, stdout, stderr, Stdin, Stdout, Stderr}; #[stable(feature = "rust1", since = "1.0.0")] pub use self::stdio::{StdoutLock, StderrLock, StdinLock}; -#[unstable(feature = "eprint", issue="40528")] -pub use self::stdio::_eprint; +#[unstable(feature = "print_internals", issue = "0")] +pub use self::stdio::{_print, _eprint}; #[unstable(feature = "libstd_io_internals", issue = "0")] #[doc(no_inline, hidden)] pub use self::stdio::{set_panic, set_print}; diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 363c99c666e..a8b0bf0071a 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -692,7 +692,7 @@ fn print_to(args: fmt::Arguments, } } -#[unstable(feature = "print", +#[unstable(feature = "print_internals", reason = "implementation detail which may disappear or be replaced at any time", issue = "0")] #[doc(hidden)] @@ -700,7 +700,7 @@ pub fn _print(args: fmt::Arguments) { print_to(args, &LOCAL_STDOUT, stdout, "stdout"); } -#[unstable(feature = "eprint_internal", +#[unstable(feature = "print_internals", reason = "implementation detail which may disappear or be replaced at any time", issue = "0")] #[doc(hidden)] diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 98c635d127f..ef78ea6dfe8 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -143,7 +143,7 @@ /// /// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="40528")] +#[stable(feature = "eprint", since="1.18.0")] #[allow_internal_unstable] macro_rules! eprint { ($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*))); @@ -162,7 +162,7 @@ /// /// Panics if writing to `io::stderr` fails. #[macro_export] -#[unstable(feature = "eprint", issue="40528")] +#[stable(feature = "eprint", since="1.18.0")] macro_rules! eprintln { () => (eprint!("\n")); ($fmt:expr) => (eprint!(concat!($fmt, "\n"))); diff --git a/src/test/run-pass/print-stdout-eprint-stderr.rs b/src/test/run-pass/print-stdout-eprint-stderr.rs index 8ca6e1c6356..f65d841700e 100644 --- a/src/test/run-pass/print-stdout-eprint-stderr.rs +++ b/src/test/run-pass/print-stdout-eprint-stderr.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(eprint)] - use std::{env, process}; fn child() { -- GitLab