Skip to content

Commit 82cd979

Browse files
committed
Stabilize IsTerminal
closes: rust-lang/rust#98070
1 parent b77fc70 commit 82cd979

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

std/src/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ pub(crate) use self::stdio::attempt_print_to_stderr;
268268
#[unstable(feature = "internal_output_capture", issue = "none")]
269269
#[doc(no_inline, hidden)]
270270
pub use self::stdio::set_output_capture;
271-
#[unstable(feature = "is_terminal", issue = "98070")]
271+
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
272272
pub use self::stdio::IsTerminal;
273273
#[unstable(feature = "print_internals", issue = "none")]
274274
pub use self::stdio::{_eprint, _print};

std/src/io/stdio.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ pub(crate) fn attempt_print_to_stderr(args: fmt::Arguments<'_>) {
10471047
}
10481048

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

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

1074-
#[unstable(feature = "is_terminal", issue = "98070")]
1075+
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
10751076
impl IsTerminal for $t {
10761077
#[inline]
10771078
fn is_terminal(&self) -> bool {

std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@
254254
#![feature(exhaustive_patterns)]
255255
#![feature(if_let_guard)]
256256
#![feature(intra_doc_pointers)]
257-
#![feature(is_terminal)]
258257
#![feature(lang_items)]
259258
#![feature(let_chains)]
260259
#![feature(linkage)]

std/src/os/fd/owned.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ macro_rules! impl_is_terminal {
201201
#[unstable(feature = "sealed", issue = "none")]
202202
impl crate::sealed::Sealed for $t {}
203203

204-
#[unstable(feature = "is_terminal", issue = "98070")]
204+
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
205205
impl crate::io::IsTerminal for $t {
206206
#[inline]
207207
fn is_terminal(&self) -> bool {

std/src/os/windows/io/handle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ macro_rules! impl_is_terminal {
389389
#[unstable(feature = "sealed", issue = "none")]
390390
impl crate::sealed::Sealed for $t {}
391391

392-
#[unstable(feature = "is_terminal", issue = "98070")]
392+
#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
393393
impl crate::io::IsTerminal for $t {
394394
#[inline]
395395
fn is_terminal(&self) -> bool {

test/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#![unstable(feature = "test", issue = "50297")]
1818
#![doc(test(attr(deny(warnings))))]
1919
#![feature(internal_output_capture)]
20-
#![feature(is_terminal)]
2120
#![feature(staged_api)]
2221
#![feature(process_exitcode_internals)]
2322
#![feature(panic_can_unwind)]

0 commit comments

Comments
 (0)