about summary refs log tree commit diff
path: root/compiler/rustc_interface
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2023-07-26 18:09:50 +0300
committerklensy <klensy@users.noreply.github.com>2023-07-26 18:09:50 +0300
commit31630859cce142d1a31a92f188682dac3f87d8ac (patch)
treed23f39571da8f5d2ca82b7168e282ba863a6088d /compiler/rustc_interface
parent52bdc37727c03e1acf164c4fb44291c0921cb2d9 (diff)
downloadrust-31630859cce142d1a31a92f188682dac3f87d8ac.tar.gz
rust-31630859cce142d1a31a92f188682dac3f87d8ac.zip
replace atty crate with std's isTerminal
Diffstat (limited to 'compiler/rustc_interface')
-rw-r--r--compiler/rustc_interface/Cargo.toml1
-rw-r--r--compiler/rustc_interface/src/util.rs3
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_interface/Cargo.toml b/compiler/rustc_interface/Cargo.toml
index 7826d42dcb2..2c7438ed9db 100644
--- a/compiler/rustc_interface/Cargo.toml
+++ b/compiler/rustc_interface/Cargo.toml
@@ -6,7 +6,6 @@ edition = "2021"
 [lib]
 
 [dependencies]
-atty = "0.2.13"
 libloading = "0.7.1"
 tracing = "0.1"
 rustc-rayon-core = { version = "0.5.0", optional = true }
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index 12d33f06309..ad35dbbc8f9 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -519,7 +519,8 @@ fn multiple_output_types_to_stdout(
     output_types: &OutputTypes,
     single_output_file_is_stdout: bool,
 ) -> bool {
-    if atty::is(atty::Stream::Stdout) {
+    use std::io::IsTerminal;
+    if std::io::stdout().is_terminal() {
         // If stdout is a tty, check if multiple text output types are
         // specified by `--emit foo=- --emit bar=-` or `-o - --emit foo,bar`
         let named_text_types = output_types