Skip to content

Commit 34f61dd

Browse files
committed
Use IsTerminal in rustc_driver
1 parent c5ad97d commit 34f61dd

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_driver/src

1 file changed

+3
-3
lines changed

compiler/rustc_driver/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! This API is completely unstable and subject to change.
66
77
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
8+
#![feature(is_terminal)]
89
#![feature(once_cell)]
910
#![recursion_limit = "256"]
1011
#![allow(rustc::potential_query_instability)]
@@ -26,7 +27,6 @@ use rustc_feature::find_gated_cfg;
2627
use rustc_interface::util::{self, collect_crate_types, get_codegen_backend};
2728
use rustc_interface::{interface, Queries};
2829
use rustc_lint::LintStore;
29-
use rustc_log::stdout_isatty;
3030
use rustc_metadata::locator;
3131
use rustc_save_analysis as save;
3232
use rustc_save_analysis::DumpHandler;
@@ -47,7 +47,7 @@ use std::default::Default;
4747
use std::env;
4848
use std::ffi::OsString;
4949
use std::fs;
50-
use std::io::{self, Read, Write};
50+
use std::io::{self, IsTerminal, Read, Write};
5151
use std::panic::{self, catch_unwind};
5252
use std::path::PathBuf;
5353
use std::process::{self, Command, Stdio};
@@ -538,7 +538,7 @@ fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) {
538538
}
539539
text.push('\n');
540540
}
541-
if stdout_isatty() {
541+
if io::stdout().is_terminal() {
542542
show_content_with_pager(&text);
543543
} else {
544544
print!("{}", text);

0 commit comments

Comments
 (0)