Skip to content

Commit

Permalink
Rollup merge of #110072 - joshtriplett:stabilize-is-terminal, r=Mark-…
Browse files Browse the repository at this point in the history
…Simulacrum

Stabilize IsTerminal

FCP completed in rust-lang/rust#98070 .

closes: rust-lang/rust#98070
  • Loading branch information
matthiaskrgr committed Apr 13, 2023
2 parents 45e25cd + 82cd979 commit ac9c0fd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ pub(crate) use self::stdio::attempt_print_to_stderr;
#[unstable(feature = "internal_output_capture", issue = "none")]
#[doc(no_inline, hidden)]
pub use self::stdio::set_output_capture;
#[unstable(feature = "is_terminal", issue = "98070")]
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
pub use self::stdio::IsTerminal;
#[unstable(feature = "print_internals", issue = "none")]
pub use self::stdio::{_eprint, _print};
Expand Down
5 changes: 3 additions & 2 deletions std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ pub(crate) fn attempt_print_to_stderr(args: fmt::Arguments<'_>) {
}

/// Trait to determine if a descriptor/handle refers to a terminal/tty.
#[unstable(feature = "is_terminal", issue = "98070")]
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
pub trait IsTerminal: crate::sealed::Sealed {
/// Returns `true` if the descriptor/handle refers to a terminal/tty.
///
Expand All @@ -1063,6 +1063,7 @@ pub trait IsTerminal: crate::sealed::Sealed {
/// Note that this [may change in the future][changes].
///
/// [changes]: io#platform-specific-behavior
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
fn is_terminal(&self) -> bool;
}

Expand All @@ -1071,7 +1072,7 @@ macro_rules! impl_is_terminal {
#[unstable(feature = "sealed", issue = "none")]
impl crate::sealed::Sealed for $t {}

#[unstable(feature = "is_terminal", issue = "98070")]
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
impl IsTerminal for $t {
#[inline]
fn is_terminal(&self) -> bool {
Expand Down
1 change: 0 additions & 1 deletion std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@
#![feature(exhaustive_patterns)]
#![feature(if_let_guard)]
#![feature(intra_doc_pointers)]
#![feature(is_terminal)]
#![feature(lang_items)]
#![feature(let_chains)]
#![feature(linkage)]
Expand Down
2 changes: 1 addition & 1 deletion std/src/os/fd/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ macro_rules! impl_is_terminal {
#[unstable(feature = "sealed", issue = "none")]
impl crate::sealed::Sealed for $t {}

#[unstable(feature = "is_terminal", issue = "98070")]
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
impl crate::io::IsTerminal for $t {
#[inline]
fn is_terminal(&self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion std/src/os/windows/io/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ macro_rules! impl_is_terminal {
#[unstable(feature = "sealed", issue = "none")]
impl crate::sealed::Sealed for $t {}

#[unstable(feature = "is_terminal", issue = "98070")]
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
impl crate::io::IsTerminal for $t {
#[inline]
fn is_terminal(&self) -> bool {
Expand Down
1 change: 0 additions & 1 deletion test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#![unstable(feature = "test", issue = "50297")]
#![doc(test(attr(deny(warnings))))]
#![feature(internal_output_capture)]
#![feature(is_terminal)]
#![feature(staged_api)]
#![feature(process_exitcode_internals)]
#![feature(panic_can_unwind)]
Expand Down

0 comments on commit ac9c0fd

Please sign in to comment.