5
5
//! This API is completely unstable and subject to change.
6
6
7
7
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
8
+ #![ feature( is_terminal) ]
8
9
#![ feature( once_cell) ]
9
10
#![ recursion_limit = "256" ]
10
11
#![ allow( rustc:: potential_query_instability) ]
@@ -26,7 +27,6 @@ use rustc_feature::find_gated_cfg;
26
27
use rustc_interface:: util:: { self , collect_crate_types, get_codegen_backend} ;
27
28
use rustc_interface:: { interface, Queries } ;
28
29
use rustc_lint:: LintStore ;
29
- use rustc_log:: stdout_isatty;
30
30
use rustc_metadata:: locator;
31
31
use rustc_save_analysis as save;
32
32
use rustc_save_analysis:: DumpHandler ;
@@ -47,7 +47,7 @@ use std::default::Default;
47
47
use std:: env;
48
48
use std:: ffi:: OsString ;
49
49
use std:: fs;
50
- use std:: io:: { self , Read , Write } ;
50
+ use std:: io:: { self , IsTerminal , Read , Write } ;
51
51
use std:: panic:: { self , catch_unwind} ;
52
52
use std:: path:: PathBuf ;
53
53
use std:: process:: { self , Command , Stdio } ;
@@ -538,7 +538,7 @@ fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) {
538
538
}
539
539
text. push ( '\n' ) ;
540
540
}
541
- if stdout_isatty ( ) {
541
+ if io :: stdout ( ) . is_terminal ( ) {
542
542
show_content_with_pager ( & text) ;
543
543
} else {
544
544
print ! ( "{}" , text) ;
0 commit comments