Stabilize IsTerminal

closes: https://github.com/rust-lang/rust/issues/98070
This commit is contained in:
Josh Triplett 2023-04-08 14:24:16 +09:00
parent 0f0dc29264
commit afd45c2e10
13 changed files with 6 additions and 15 deletions

View File

@ -5,7 +5,6 @@
//! This API is completely unstable and subject to change.
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(is_terminal)]
#![feature(lazy_cell)]
#![feature(decl_macro)]
#![recursion_limit = "256"]

View File

@ -6,7 +6,6 @@
#![feature(array_windows)]
#![feature(drain_filter)]
#![feature(if_let_guard)]
#![feature(is_terminal)]
#![feature(adt_const_params)]
#![feature(let_chains)]
#![feature(never_type)]

View File

@ -40,7 +40,6 @@
#![deny(rustc::untranslatable_diagnostic)]
#![deny(rustc::diagnostic_outside_of_impl)]
#![feature(is_terminal)]
use std::env::{self, VarError};
use std::fmt::{self, Display};

View File

@ -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};

View File

@ -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.
///
@ -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;
}
@ -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 {

View File

@ -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)]

View File

@ -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 {

View File

@ -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 {

View File

@ -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)]

View File

@ -7,7 +7,6 @@
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(drain_filter)]
#![feature(is_terminal)]
#![feature(let_chains)]
#![feature(test)]
#![feature(never_type)]

View File

@ -7,7 +7,6 @@
#![feature(yeet_expr)]
#![feature(nonzero_ops)]
#![feature(local_key_cell_methods)]
#![feature(is_terminal)]
#![feature(round_ties_even)]
// Configure clippy and other lints
#![allow(

View File

@ -3,7 +3,6 @@
#![feature(io_error_more)]
#![feature(io_error_uncategorized)]
#![feature(is_terminal)]
use std::collections::HashMap;
use std::ffi::{c_char, OsString};

View File

@ -1,5 +1,3 @@
#![feature(is_terminal)]
use std::io::IsTerminal;
fn main() {